mirror of
https://github.com/Ascyii/typstar.git
synced 2026-01-01 05:24:24 -05:00
fix: allow overriding of computed max trig length
This commit is contained in:
@@ -99,7 +99,7 @@ function M.engine(trigger, opts)
|
|||||||
-- determine possibly max/fixed length of trigger
|
-- determine possibly max/fixed length of trigger
|
||||||
local max_length = opts.maxTrigLength
|
local max_length = opts.maxTrigLength
|
||||||
local is_fixed_length = false
|
local is_fixed_length = false
|
||||||
if alts_regex ~= '' and not trigger:match('[%+%*]') then
|
if max_length ~= nil and alts_regex ~= '' and not trigger:match('[%+%*]') then
|
||||||
max_length = #trigger
|
max_length = #trigger
|
||||||
- utils.count_string(trigger, '\\')
|
- utils.count_string(trigger, '\\')
|
||||||
- utils.count_string(trigger, '%(')
|
- utils.count_string(trigger, '%(')
|
||||||
|
|||||||
Reference in New Issue
Block a user