File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 11let s: search_files_sort_max = 1000
2+ let s: prev_list = []
3+ let s: prev_display = []
4+ let s: prev_input = ' '
25
36function ! project#search_files#Run ()
47 if ! project#ProjectExist ()
@@ -23,9 +26,18 @@ function! s:Init(input)
2326endfunction
2427
2528function ! s: Update (input )
26- let [list , display ] = s: GetSearchFilesResult (a: input )
27- call project#SetVariable (' input' , a: input )
28- call project#SetVariable (' list' , list )
29+ if ! empty (a: input ) && (a: input == s: prev_input )
30+ let list = s: prev_list
31+ let display = s: prev_display
32+ else
33+ let [list , display ] = s: GetSearchFilesResult (a: input )
34+ let s: prev_list = list
35+ let s: prev_display = display
36+ let s: prev_input = a: input
37+
38+ call project#SetVariable (' input' , a: input )
39+ call project#SetVariable (' list' , list )
40+ endif
2941 call project#ShowInListBuffer (display , a: input )
3042 call project#HighlightCurrentLine (len (display ))
3143 call project#HighlightInputChars (a: input )
You can’t perform that action at this time.
0 commit comments