From ba21c56129e8007fbdc63a5a10b1310b2397e6ac Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Mon, 24 May 2021 09:44:56 +0100 Subject: [PATCH] Expand docs on how to close a hunk preview window See #784. --- doc/gitgutter.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/gitgutter.txt b/doc/gitgutter.txt index e5bb058..a4da6ba 100644 --- a/doc/gitgutter.txt +++ b/doc/gitgutter.txt @@ -172,9 +172,19 @@ Commands for operating on a hunk:~ *gitgutter-:GitGutterPreviewHunk* :GitGutterPreviewHunk Preview the hunk the cursor is in. - Use |:pclose| or |CTRL-W_CTRL-Z| to close the preview - window, or set |g:gitgutter_close_preview_on_escape| - and use . + + To close a non-floating preview window use |:pclose| + or |CTRL-W_z| or |CTRL-W_CTRL-Z|; or normal window- + closing (|:quit| or |:close| or |CTRL-W_c|) if your cursor + is in the preview window. + + To close a floating window when the cursor is in the + original buffer, move the cursor. + + To close a floating window when the cursor is in the + floating window use normal window-closing, or move to + the original window with |CTRL-W_p|. Alternatively set + |g:gitgutter_close_preview_on_escape| and use . To stage part of the hunk, move to the preview window, delete any lines you do not want to stage, and