Skip to content

Commit 838a6dd

Browse files
committed
do not modify guicursor if it is empty
close #366
1 parent 3a048e8 commit 838a6dd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

autoload/ctrlp.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,9 @@ fu! s:KeyLoop()
10061006
wh exists('s:init') && s:keyloop
10071007
try
10081008
set t_ve=
1009-
set guicursor=a:NONE
1009+
if guicursor != ''
1010+
set guicursor=a:NONE
1011+
en
10101012
let nr = getchar()
10111013
fina
10121014
let &t_ve = t_ve
@@ -2009,7 +2011,7 @@ fu! s:bufnrfilpath(line)
20092011
if (a:line =~ '[\/]\?\[\d\+\*No Name\]$')
20102012
let bufnr = str2nr(matchstr(a:line, '[\/]\?\[\zs\d\+\ze\*No Name\]$'))
20112013
let filpath = bufnr
2012-
else
2014+
els
20132015
let bufnr = bufnr(a:line)
20142016
retu [bufnr, a:line]
20152017
en
@@ -2414,7 +2416,7 @@ fu! s:buildpat(lst)
24142416
let c = a:lst[item - 1]
24152417
let pat .= (c == '/' ? '[^/]\{-}' : '[^'.c.'/]\{-}').a:lst[item]
24162418
endfo
2417-
else
2419+
els
24182420
for item in range(1, len(a:lst) - 1)
24192421
let pat .= '[^'.a:lst[item - 1].']\{-}'.a:lst[item]
24202422
endfo

0 commit comments

Comments
 (0)