Add callback on BufLeave

This commit is contained in:
Dheepak Krishnamurthy
2020-04-08 11:05:35 -06:00
parent 1d62d6ee63
commit 770f9af1c5

View File

@@ -83,6 +83,7 @@ local function open_floating_window()
-- use autocommand to ensure that the border_buffer closes at the same time as the main buffer
vim.cmd('autocmd BufWipeout <buffer> silent! execute "silent bwipeout!"' .. border_buffer)
vim.cmd([[autocmd BufLeave <buffer> execute "call luaeval(\"require('lazygit').on_buf_leave()\")"]])
end
local function on_buf_leave()