Closed Reisen closed 1 year ago
On second thoughts this might be a bug. For now I'm working around it by leaving max_length
nil and setting it explicitly in my keymap:
keys = {
{ 's', mode = { 'n', 'x', 'o' }, function() require 'flash'.jump({ search = { max_length = 2 } }) end, desc = 'Jump' }
}
In lua, doing {search = {max_length = nil}}
is the same as {search = {}}
, so there's no way to differentiate between the two.
You could set max_length = false
instead, but it's better to just set it specifically for the jump keymap as you did.
Did you check the docs?
Is your feature request related to a problem? Please describe.
When setting
max_length
underconfig -> search
thes/S
style mappings work as expected, but when using/
this is also applied. While It's possible to toggle this on/off it's not very fluid.Describe the solution you'd like
I would like to be able to set this using the provided search suboptions:
So that I retain unlimited character typing only when using
/
, but currently this does not seem to work, not sure if unintentional or not.Describe alternatives you've considered
Just not setting
max_length
at all but I prefer the 2-char cancelling behaviour when usings
.Additional context
No response