You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs for MultiPattern::reparse explain that the 'append' argument should be set to true if the new query string contains the old query string as a prefix.
However, it seems to me that this does not consider the case when there is a trailing \? I had to add this extra check downstream in nucleo_picker in order to get proper search results.
I guess either this is actually an error (and the reparse method should be fixed) or it should be clarified in the documentation that one also needs to check for the presence of a trailing \.
The text was updated successfully, but these errors were encountered:
alexrutar
changed the title
Ambiguous documentation for append argument to MultiPattern::reparse
(Potentially) incorrect handling of trailing \ in MultiPattern::reparseDec 9, 2024
Yeah that is an oversight, should just include a check wether the pattern ends with a backslash. Altough I vaguely remeber I did include that but maybe forgot somewhere (or maybe I forgot to add it and just planned it)
The docs for
MultiPattern::reparse
explain that the 'append' argument should be set totrue
if the new query string contains the old query string as a prefix.However, it seems to me that this does not consider the case when there is a trailing
\
? I had to add this extra check downstream innucleo_picker
in order to get proper search results.It seems plausible to me that this is also a bug in
helix
: https://github.com/helix-editor/helix/blob/db1d84256fbae21abb3ba46943fb1abb8e211355/helix-term/src/ui/picker.rs#L539I guess either this is actually an error (and the reparse method should be fixed) or it should be clarified in the documentation that one also needs to check for the presence of a trailing
\
.Edit: Seems to be a missing check here
nucleo/src/pattern.rs
Lines 53 to 59 in d17e29a
The text was updated successfully, but these errors were encountered: