dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

Commit: f6ad60db5b68dfe2afcd606d306e597daa547884
Parent: 50cc3d33e4f5a11a950492ee3c8c2d7015c91971
Author: Randy Palamar
Date:   Thu,  9 Feb 2023 11:41:29 -0700

vis: build.lua: build() should run on currently active file

this also means that build_files() only needs to run on vis init since
we need to get the active window each time build() is run.

Diffstat:
M.config/vis/build.lua | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.config/vis/build.lua b/.config/vis/build.lua @@ -52,7 +52,7 @@ local function build_files(win) -- write file vis:command('w') - local f, e = util:splitext(win.file.name) + local f, e = util:splitext(vis.win.file.name) if f == nil then error() return end local method = lang[e] @@ -62,7 +62,7 @@ local function build_files(win) method(f) end - vis:map(vis.modes.NORMAL, ',c', build) - vis:command_register('build', build) + vis:map(vis.modes.NORMAL, ',c', build, "build file in current window") + vis:command_register('build', build, "build file in current window") end -vis.events.subscribe(vis.events.WIN_OPEN, build_files) +vis.events.subscribe(vis.events.INIT, build_files)