Skip to content

Commit 1111b9d

Browse files
committed
Auto-close floating commit view with blur
1 parent 210c100 commit 1111b9d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lua/neogit/buffers/commit_view/init.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ function M:open(kind)
153153
kind = kind,
154154
status_column = not config.values.disable_signs and "" or nil,
155155
context_highlight = not config.values.disable_context_highlighting,
156+
autocmds = {
157+
["WinLeave"] = function()
158+
if self.buffer.kind == "floating" then
159+
pcall(self.close, self)
160+
end
161+
end,
162+
},
156163
mappings = {
157164
n = {
158165
["<cr>"] = function()

0 commit comments

Comments
 (0)