aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorYasuhiro Matsumoto2022-03-17 01:57:23 +0900
committerYasuhiro Matsumoto2022-03-17 01:57:23 +0900
commitf75c3291f44f4d0c11257f089475fc3682afb6cb (patch)
treeb517af9fc48c09b2777c830fb46855eaf88bfd9f
parent83f1c204d0209f4782aadd22f5f5d34a43e9959e (diff)
downloadctrlp.vim-f75c3291f44f4d0c11257f089475fc3682afb6cb.tar.gz

Add small optimizations

-rw-r--r--autoload/ctrlp.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim
index febdcc9..2818446 100644
--- a/autoload/ctrlp.vim
+++ b/autoload/ctrlp.vim
@@ -1762,8 +1762,9 @@ fu! s:formatline2(ct, key, str)
let str .= printf(' %s', parts[3])
en
en
+ retu s:lineprefix.str
en
- let cond = a:ct != 'buf' &&s:ispath && ( s:winw - 4 ) < s:strwidth(str)
+ let cond = s:ispath && ( s:winw - 4 ) < strchars(str)
retu s:lineprefix.( cond ? s:pathshorten(str) : str )
endf