Skip to content

Commit

Permalink
Provide gq to close status buffer
Browse files Browse the repository at this point in the history
References #1221
  • Loading branch information
tpope committed Mar 1, 2019
1 parent 57b4d84 commit bd0b87d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions autoload/fugitive.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,7 @@ function! fugitive#BufReadStatus() abort
nnoremap <buffer> <silent> P :<C-U>execute <SID>StagePatch(line('.'),line('.')+v:count1-1)<CR>
xnoremap <buffer> <silent> P :<C-U>execute <SID>StagePatch(line("'<"),line("'>"))<CR>
nnoremap <buffer> <silent> q :<C-U>if bufnr('$') == 1<Bar>quit<Bar>else<Bar>bdelete<Bar>endif<CR>
nnoremap <buffer> <silent> gq :<C-U>if bufnr('$') == 1<Bar>quit<Bar>else<Bar>bdelete<Bar>endif<CR>
nnoremap <buffer> <silent> R :<C-U>exe <SID>ReloadStatus()<CR>
nnoremap <buffer> <silent> U :<C-U>echoerr 'Changed to X'<CR>
nnoremap <buffer> <silent> g<Bar> :<C-U>execute <SID>StageDelete(line('.'),v:count)<CR>
Expand Down
4 changes: 2 additions & 2 deletions doc/fugitive.txt
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ rd Perform an interactive rebase with the commit under
*fugitive-misc-mappings*
Miscellaneous mappings ~

*fugitive_q*
q Close the status buffer.
*fugitive_gq* *fugitive_q*
gq Close the status buffer.

*fugitive_R*
R Reload the status buffer.
Expand Down

0 comments on commit bd0b87d

Please sign in to comment.