From 33cb7744c30bee01f91970048ed4d96058c364e2 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Fri, 7 Mar 2025 09:45:42 +0000 Subject: [PATCH] Document re-preview moving into Nvim floating window See #903. --- README.mkd | 2 ++ doc/gitgutter.txt | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.mkd b/README.mkd index cb9802a..2299dc7 100644 --- a/README.mkd +++ b/README.mkd @@ -533,6 +533,8 @@ let g:gitgutter_async = 0 Add `let g:gitgutter_preview_win_floating = 1` to your `~/.vimrc`. Note that on Vim this prevents you staging (partial) hunks via the preview window. +On Neovim, the preview hunk command will move the cursor into the floating window if it is already open. + #### The appearance of a floating/popup window for hunk previews diff --git a/doc/gitgutter.txt b/doc/gitgutter.txt index bb93067..0782d36 100644 --- a/doc/gitgutter.txt +++ b/doc/gitgutter.txt @@ -201,7 +201,9 @@ Commands for operating on a hunk:~ :GitGutterUndoHunk Undo the hunk the cursor is in. *gitgutter-:GitGutterPreviewHunk* -:GitGutterPreviewHunk Preview the hunk the cursor is in. +:GitGutterPreviewHunk Preview the hunk the cursor is in or, if you are using + floating preview windows in Neovim and the window is + already open, move the cursor into the window. To stage part of the hunk, move to the preview window, delete any lines you do not want to stage, and