From b04c951b686b56b6182478e45aac8a4b0a93ae1f Mon Sep 17 00:00:00 2001 From: kmalloc Date: Thu, 31 Oct 2013 14:37:32 -0700 Subject: [PATCH] switch to buffer instead of switching to window --- plugin/mru.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/mru.vim b/plugin/mru.vim index d4a0045..ad96398 100644 --- a/plugin/mru.vim +++ b/plugin/mru.vim @@ -530,9 +530,9 @@ function! s:MRU_Window_Edit_File(fname, multi, edit_type, open_type) else " If the selected file is already open in one of the windows, " jump to it - let winnum = bufwinnr('^' . a:fname . '$') - if winnum != -1 - exe winnum . 'wincmd w' + let bufnum = bufnr('^' . a:fname . '$') + if bufnum != -1 + exe "sb ".bufnum else if g:MRU_Auto_Close == 1 && g:MRU_Use_Current_Window == 0 " Jump to the window from which the MRU window was opened