billthefarmer/editor

[Bug] Search misbehaves, makes Editor crash

Closed this issue · 3 comments

GfEW commented

When trying to search for closing parantheses, i. e. the search term is the single character ')', Editor misbehaves in two conditionally different ways:

  • (a) If no previous search has been performed in the current session, Editor crashes.
  • (b) If at least one previous search (for a different term) has been performed since Editor started, searching for ')' behaves as if the very last previous search term was still being searched for. If you search e. g. for the term 'yellow', then delete that search term with six backspaces, then enter ')' in the search box to find closing parantheses, highlighting will instead cycle through occurrences of 'y' (if any) because that was the last search term before the search box got emptied by the sixth backspace.

This issue is reproducible in Editor version 1.90 on two different devices, one running Android 9, the other one Android 11.

That's a good one, it's taken a long time for someone to find that. It appears that the search widget partially ignores open and close brackets and doesn't call the on text changed callback. I looked at the code and couldn't see how. Fixed in the next version.

GfEW commented

it's taken a long time for someone to find

Just being curious, how many years (roundabout) since it was introduced? o.O

EDIT: Issue got closed inadvertantly by a malfunctioning touchscreen - somewhat early I guess, hence reopened. Sorry.

The version with regex search v1.07, was released on Oct 29, 2017, so 6 years.