Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 1d4226f

Browse files
committed
Fix #313 (substring_match for Lisp): use simple=true
We can't feed arbitrary prefixes to substring_match match in non-simple mode. We run into problems when the buffer has alternative word rules (Like Lisp buffers with vlime). The problem arises when prefix ends with % like for instance `foo%`.
1 parent 6b9db5d commit 1d4226f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/completion/matching.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ end
3030

3131
local function substring_match(prefix, word)
3232
prefix, word = setup_case(prefix, word)
33-
if string.find(word, prefix) then
33+
if string.find(word, prefix, 1, true) then
3434
return true
3535
else
3636
return false

0 commit comments

Comments
 (0)