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