There is a bug in Editor v. 1.96 that confuses search order when Enter on a physical keyboard is pressed in the search widget multiple times to find next occurrences. This 42 byte text file contains four occurrences of '[[' which should be found in order, but are not: editor_v-1-96_find-results-order-bug_demo_20250401.txt
Affected devices: diverse; with physical keyboard
Architecture: armeabi-v7a, arm64-v8a
Android version: 9 to 11
Editor version: 1.96 (F-Droid)
How to reproduce the bug
- Open editor_v-1-96_find-results-order-bug_demo_20250401.txt in Editor
1.a. Optional: press Ctrl+E to enter edit mode (if only to show it doesn't matter)
- Press
Ctrl+F to open the search widget
- Enter the four character string
\[\[ into the search line
3.1. Press Enter once, note which match is highlighted
3.2. Press Enter again, note which match is highlighted
3.3. Press Enter again, note which match is highlighted
3.4. Press Enter again, note which match is highlighted
3.5. Press Enter again, note which match is highlighted
3.6. Press Enter again, note which match is highlighted
What should happen?
- Step 3.1. should find '[[first]]'
- Step 3.2. should find '[[second]]'
- Step 3.3. should find '[[third]]'
- Step 3.4. should find '[[fourth]]'
- Step 3.5. should find '[[first]]' (overwrapped, possibly after another press of
Enter)
- Step 3.6. should find '[[second]]' (overwrapped)
What does happen instead?
- Step 3.1. finds '[[first]]'
- Step 3.2. finds '[[third]]'
- Step 3.3. finds '[[fourth]]'
- Step 3.4. finds '[[second]]'
- Step 3.5. finds '[[fourth]]'
- Step 3.6. finds '[[first]]'
Additional remarks
- Note that for many, pressing
Enter in the search widget is the default keyboard way to get to search results beyond the first occurrence. Also, Enter serves as a fallback on keyboards where you can't type Ctrl+Alt+F nor F3.
- For a physical keyboard to trigger the bug, it doesn't seem to matter whether it is externally connected (via USB or bluetooth), or built-in.
- I couldn't reproduce the bug on the soft keyboards tested so far (that's Unexpected Keyboard, Fossify's Simple Keyboard, and Hacker's Keyboard).
NOTE: Should you think this bug resides upstream, please let me know where, and I'll happily report it there. Thank you!
EDIT 20250402: Apparently, this only occurs with a physical keyboard! I've updated the above description accordingly.
EDIT 20250423: Possibly related: https://stackoverflow.com/questions/4513888/enter-key-on-edittext-hitting-onkey-twice
There is a bug in Editor v. 1.96 that confuses search order when
Enteron a physical keyboard is pressed in the search widget multiple times to find next occurrences. This 42 byte text file contains four occurrences of '[[' which should be found in order, but are not: editor_v-1-96_find-results-order-bug_demo_20250401.txtAffected devices: diverse; with physical keyboard
Architecture: armeabi-v7a, arm64-v8a
Android version: 9 to 11
Editor version: 1.96 (F-Droid)
How to reproduce the bug
1.a. Optional: press
Ctrl+Eto enter edit mode (if only to show it doesn't matter)Ctrl+Fto open the search widget\[\[into the search line3.1. Press
Enteronce, note which match is highlighted3.2. Press
Enteragain, note which match is highlighted3.3. Press
Enteragain, note which match is highlighted3.4. Press
Enteragain, note which match is highlighted3.5. Press
Enteragain, note which match is highlighted3.6. Press
Enteragain, note which match is highlightedWhat should happen?
Enter)What does happen instead?
Additional remarks
Enterin the search widget is the default keyboard way to get to search results beyond the first occurrence. Also,Enterserves as a fallback on keyboards where you can't typeCtrl+Alt+FnorF3.NOTE: Should you think this bug resides upstream, please let me know where, and I'll happily report it there. Thank you!
EDIT 20250402: Apparently, this only occurs with a physical keyboard! I've updated the above description accordingly.
EDIT 20250423: Possibly related: https://stackoverflow.com/questions/4513888/enter-key-on-edittext-hitting-onkey-twice