From ef2cfde9d3b8a3dcac48dee851c7efa3a06a2bfe Mon Sep 17 00:00:00 2001 From: Jerome Reybert <jreybert@gmail.com> Date: Wed, 8 Mar 2017 14:26:10 +0100 Subject: [PATCH] Fix jump to "file already aopen" abort fix #128 --- plugin/magit.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugin/magit.vim b/plugin/magit.vim index 2523a0c..609451e 100644 --- a/plugin/magit.vim +++ b/plugin/magit.vim @@ -1149,7 +1149,15 @@ function! magit#jump_to() execute buf_win."wincmd w" endif + try execute "edit " . "+" . line . " " filename + catch + if ( v:exception == 'Vim:Interrupt' && buf_win == 0) + close + elseif ( v:exception != 'Vim(edit):E325: ATTENTION' ) + throw v:exception + endif + endtry endfunction function! magit#update_diff(way) -- GitLab