From 0eff0208866a8d558f6ec6705941d27779ed7438 Mon Sep 17 00:00:00 2001 From: Kyo Nagashima Date: Fri, 16 Dec 2011 22:22:20 +0900 Subject: [PATCH] enable jump-to-open-buffer feature when trying to open buffer in tab --- autoload/ctrlp.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index 5cbed86..7f2aa3f 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -669,7 +669,7 @@ fu! ctrlp#acceptfile(mode, matchstr, ...) let filpath = s:itemtype ? matchstr : getcwd().s:lash.matchstr cal s:PrtExit() let bufnum = bufnr(filpath) - if s:jmptobuf && bufnum > 0 && md == 'e' + if s:jmptobuf && bufnum > 0 && (md == 'e' || md == 't') let [jmpb, bufwinnr] = [1, bufwinnr(bufnum)] let buftab = s:jmptobuf > 1 ? s:buftab(bufnum) : [0, 0] let j2l = a:0 ? a:1 : str2nr(matchstr(s:tail(), '^ +\zs\d\+$'))