mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 11:18:26 +00:00
fix(picker.matcher): don't optimize pattern subsets when pattern has a negation
This commit is contained in:
parent
a3bf5bf6ff
commit
a6b3d7840b
1 changed files with 4 additions and 1 deletions
|
@ -179,7 +179,10 @@ function M:init(pattern)
|
||||||
self.tick = self.tick + 1
|
self.tick = self.tick + 1
|
||||||
self.file = nil
|
self.file = nil
|
||||||
self.mods = {}
|
self.mods = {}
|
||||||
self.subset = self.pattern ~= "" and pattern:find(self.pattern, 1, true) == 1 and not pattern:find("|", 1, true)
|
self.subset = self.pattern ~= ""
|
||||||
|
and pattern:find(self.pattern, 1, true) == 1
|
||||||
|
and not pattern:find("|", 1, true)
|
||||||
|
and not pattern:find("!", 1, true)
|
||||||
self.pattern = pattern
|
self.pattern = pattern
|
||||||
self:abort()
|
self:abort()
|
||||||
self.one = nil
|
self.one = nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue