Skip to content

Commit

Permalink
Use VimLeavePre over ExitPre for running on-exit hooks #522
Browse files Browse the repository at this point in the history
  • Loading branch information
Olical committed Aug 4, 2023
1 parent 50a7654 commit 0d9b823
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fnl/conjure/mapping.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
(nvim.ex.autocmd
:VimLeavePre :*
(bridge.viml->lua :conjure.log :clear-close-hud-passive-timer {}))
(nvim.ex.autocmd :ExitPre :* (viml->fn on-exit))
(nvim.ex.autocmd :VimLeavePre :* (viml->fn on-exit))
(nvim.ex.autocmd :QuitPre :* (viml->fn on-quit))
(nvim.ex.augroup :END))

Expand Down
2 changes: 1 addition & 1 deletion lua/conjure/mapping.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ local function init(filetypes)
nvim.ex.autocmd("CursorMoved", "*", bridge["viml->lua"]("conjure.inline", "clear", {}))
nvim.ex.autocmd("CursorMovedI", "*", bridge["viml->lua"]("conjure.inline", "clear", {}))
nvim.ex.autocmd("VimLeavePre", "*", bridge["viml->lua"]("conjure.log", "clear-close-hud-passive-timer", {}))
nvim.ex.autocmd("ExitPre", "*", ("lua require('" .. _2amodule_name_2a .. "')['" .. "on-exit" .. "']()"))
nvim.ex.autocmd("VimLeavePre", "*", ("lua require('" .. _2amodule_name_2a .. "')['" .. "on-exit" .. "']()"))
nvim.ex.autocmd("QuitPre", "*", ("lua require('" .. _2amodule_name_2a .. "')['" .. "on-quit" .. "']()"))
return nvim.ex.augroup("END")
end
Expand Down

0 comments on commit 0d9b823

Please sign in to comment.