Skip to content

Commit 1749b97

Browse files
committed
bugfix
1 parent ac8dc7a commit 1749b97

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

autoload/easycomplete/sources/buf.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ function! s:GetBufKeywordsList(typing)
140140
" 53378 → 4781 0.102643
141141
" 53378 → 4781 0.101672
142142
" vim 的实现还是应该性能优先,只匹配首字符
143-
call filter(tmpkeywords, 'v:val =~ "^' . a:typing . '" && v:val !=# "' . a:typing . '"')
143+
" call filter(tmpkeywords, 'v:val =~ "^' . a:typing . '" && v:val !=# "' . a:typing . '"')
144+
call filter(tmpkeywords, 'v:val =~ "^' . a:typing . '"')
144145
let keyword_list = tmpkeywords
145146
endif
146147
" call easycomplete#util#StopRecord('filter ' . len(tmpkeywords) . "→" . len(keyword_list))

lua/easycomplete.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ function EasyComplete.filter(match_list, needle)
178178
goto continue
179179
elseif item == needle then
180180
-- pass
181+
table.insert(result, item)
181182
goto continue
182183
end
183184
local idx = string.find(string.lower(item), "" .. string.lower(needle))

0 commit comments

Comments
 (0)