aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authormattn2022-03-17 02:43:56 +0900
committerGitHub2022-03-17 02:43:56 +0900
commit02d72d6a4008b0f0ef28a3bbefa67c231645fcaa (patch)
tree57f7dbb7e984ef37c72d0f08bc683904153169e2
parentacbff25680820cd5d52a608a774c816f15e20859 (diff)
parent628958ecb21046706c108d5a1aa2cc320438bf25 (diff)
downloadctrlp.vim-02d72d6a4008b0f0ef28a3bbefa67c231645fcaa.tar.gz

Merge pull request #597 from ctrlpvim/optimize5

Lines can be omitted over s:maxlines

-rw-r--r--autoload/ctrlp.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim
index cdf9509..fcb1823 100644
--- a/autoload/ctrlp.vim
+++ b/autoload/ctrlp.vim
@@ -753,6 +753,9 @@ fu! s:Render(lines, pat)
en
if s:mw_order == 'btt' | cal reverse(lines) | en
let s:lines = copy(lines)
+ if s:maxfiles && len(lines) > s:maxfiles
+ let lines = lines[:s:maxfiles]
+ en
if has('patch-8.1-0') && s:flfunc ==# 's:formatline(v:val)'
cal map(lines, function('s:formatline2', [s:curtype()]))
el