Fix #1443
This commit is contained in:
@@ -198,7 +198,7 @@ end
|
|||||||
|
|
||||||
--- fuzzy
|
--- fuzzy
|
||||||
matcher.fuzzy = function(input, word, matches)
|
matcher.fuzzy = function(input, word, matches)
|
||||||
local input_index = matches[1] and (matches[1].input_match_end + 1) or 1
|
local input_index = matches[#matches] and (matches[#matches].input_match_end + 1) or 1
|
||||||
|
|
||||||
-- Lately specified middle of text.
|
-- Lately specified middle of text.
|
||||||
for i = 1, #matches - 1 do
|
for i = 1, #matches - 1 do
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ describe('matcher', function()
|
|||||||
assert.is.truthy(matcher.match('Unit', 'net.UnixListener', { disallow_partial_fuzzy_matching = true }) == 0)
|
assert.is.truthy(matcher.match('Unit', 'net.UnixListener', { disallow_partial_fuzzy_matching = true }) == 0)
|
||||||
assert.is.truthy(matcher.match('Unit', 'net.UnixListener', { disallow_partial_fuzzy_matching = false }) >= 1)
|
assert.is.truthy(matcher.match('Unit', 'net.UnixListener', { disallow_partial_fuzzy_matching = false }) >= 1)
|
||||||
|
|
||||||
|
assert.is.truthy(matcher.match('emg', 'error_msg') >= 1)
|
||||||
|
assert.is.truthy(matcher.match('sasr', 'saved_splitright') >= 1)
|
||||||
|
|
||||||
local score, matches
|
local score, matches
|
||||||
score, matches = matcher.match('tail', 'HCDetails', {
|
score, matches = matcher.match('tail', 'HCDetails', {
|
||||||
disallow_fuzzy_matching = false,
|
disallow_fuzzy_matching = false,
|
||||||
|
|||||||
Reference in New Issue
Block a user