Skip to content

Commit f75c329

Browse files
committed
Add small optimizations
1 parent 83f1c20 commit f75c329

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

autoload/ctrlp.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1762,8 +1762,9 @@ fu! s:formatline2(ct, key, str)
17621762
let str .= printf(' %s', parts[3])
17631763
en
17641764
en
1765+
retu s:lineprefix.str
17651766
en
1766-
let cond = a:ct != 'buf' &&s:ispath && ( s:winw - 4 ) < s:strwidth(str)
1767+
let cond = s:ispath && ( s:winw - 4 ) < strchars(str)
17671768
retu s:lineprefix.( cond ? s:pathshorten(str) : str )
17681769
endf
17691770

0 commit comments

Comments
 (0)