Skip to content

Commit

Permalink
plugin/magit.vim: if opened with MagitOnly, 'q' shows previous buffer
Browse files Browse the repository at this point in the history
I hope all the cases are well handled and it does break anything

fix #137
  • Loading branch information
jreybert committed May 23, 2017
1 parent 44ea0ac commit 0cbd6b4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugin/magit.vim
Original file line number Diff line number Diff line change
Expand Up @@ -717,9 +717,9 @@ function! magit#show_magit(display, ...)
if ( magit_win != 0 )
silent execute magit_win."wincmd w"
elseif ( a:display == 'v' )
silent execute "vnew " . buffer_name
silent execute "keepalt vnew " . buffer_name
elseif ( a:display == 'h' )
silent execute "new " . buffer_name
silent execute "keepalt new " . buffer_name
elseif ( a:display == 'c' )
if ( !bufexists(buffer_name) )
if ( bufname("%") == "" )
Expand Down Expand Up @@ -836,11 +836,11 @@ endfunction

function! magit#close_magit()
try
close
catch /^Vim\%((\a\+)\)\=:E444/
edit #
catch /^Vim\%((\a\+)\)\=:E\%(194\|499\)/
try
edit #
catch /^Vim\%((\a\+)\)\=:E\%(194\|499\)/
close
catch /^Vim\%((\a\+)\)\=:E444/
quit
endtry
endtry
Expand Down

0 comments on commit 0cbd6b4

Please sign in to comment.