Skip to content
Snippets Groups Projects
Commit ba62ca12 authored by Jerome Reybert's avatar Jerome Reybert
Browse files

plugin/magit.vim: jump to magit buffer if already displayed in a window (fix #76)

parent 67199915
No related branches found
No related tags found
No related merge requests found
......@@ -627,7 +627,11 @@ function! magit#show_magit(display, ...)
let buffer_name='magit://' . git_dir
if ( a:display == 'v' )
let magit_win = magit#utils#search_buffer_in_windows(buffer_name)
if ( magit_win != 0 )
silent execute magit_win."wincmd w"
elseif ( a:display == 'v' )
silent execute "vnew " . buffer_name
elseif ( a:display == 'h' )
silent execute "new " . buffer_name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment