Add TabLeave to hunk close trigger

See #852
This commit is contained in:
woodyZootopia
2023-03-13 23:21:32 +09:00
committed by Andy Stewart
parent edb607cc4b
commit 3d29f67380

View File

@@ -436,7 +436,7 @@ function! s:open_hunk_preview_window()
call nvim_buf_set_name(buf, 'gitgutter://hunk-preview')
" Assumes cursor is in original window.
autocmd CursorMoved <buffer> ++once call gitgutter#hunk#close_hunk_preview_window()
autocmd CursorMoved,TabLeave <buffer> ++once call gitgutter#hunk#close_hunk_preview_window()
if g:gitgutter_close_preview_on_escape
" Map <Esc> to close the floating preview.