Skip to content

Commit a1a6936

Browse files
committed
Optimize cache logic for search files
1 parent 8245f2a commit a1a6936

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autoload/project/search_files.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ function! s:Init(input)
2626
endfunction
2727

2828
function! s:Update(input)
29-
if !empty(a:input) && (a:input == s:prev_input)
29+
let use_cache = empty(a:input) ? !empty(s:prev_list) : (a:input == s:prev_input)
30+
if use_cache
3031
let list = s:prev_list
3132
let display = s:prev_display
3233
else

0 commit comments

Comments
 (0)