feat: Add option for user's on exit callback (#144)
## Motivation: If I close LazyGit after having done some changes (Commit something/change branch…) I often run into some minor inconsistency with the UI on screen, that does not get updated to reflect the changes. In particular the issue I’m having is with the color of the files inside the [neo-tree](https://github.com/nvim-neo-tree/neo-tree.nvim) view. I understand this is a really insignificant issue, but I still would like to fix it. ## Proposed solution: I have added an option that allow an user of the plugin to add a callback that is automatically executed after exiting LazyGit, so that I can put there the necessary code to refresh my UI
This commit is contained in:
committed by
GitHub
parent
cc07dc1599
commit
02a7a2789f
@@ -35,6 +35,10 @@ local function on_exit(job_id, code, event)
|
||||
buffer = -1
|
||||
win = -1
|
||||
end
|
||||
|
||||
if vim.g.lazygit_on_exit_callback ~= nil then
|
||||
vim.g.lazygit_on_exit_callback()
|
||||
end
|
||||
end
|
||||
|
||||
--- Call lazygit
|
||||
|
||||
Reference in New Issue
Block a user