Fix closing floating preview window

When a floating window is closed, the cursor automatically goes back to
the original window.  There is no need to try to do this ourselves.

Fixes #866.
This commit is contained in:
Andy Stewart
2023-08-17 13:45:56 +01:00
parent 68f16eb21f
commit a7a83c376c

View File

@@ -248,7 +248,9 @@ function! s:hunk_op(op, ...)
let hunk_diff = join(hunk_header + hunk_body, "\n")."\n"
if &previewwindow
call s:goto_original_window()
endif
call gitgutter#hunk#close_hunk_preview_window()
call s:stage(hunk_diff)
endif