diff options
| author | Yasuhiro Matsumoto | 2022-03-17 01:57:23 +0900 |
|---|---|---|
| committer | Yasuhiro Matsumoto | 2022-03-17 01:57:23 +0900 |
| commit | f75c3291f44f4d0c11257f089475fc3682afb6cb (patch) | |
| tree | b517af9fc48c09b2777c830fb46855eaf88bfd9f | |
| parent | 83f1c204d0209f4782aadd22f5f5d34a43e9959e (diff) | |
| download | ctrlp.vim-f75c3291f44f4d0c11257f089475fc3682afb6cb.tar.gz | |
Add small optimizations
| -rw-r--r-- | autoload/ctrlp.vim | 3 |
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 |