[FEATURE] Search for a text inside a Note (find as you type should be optional, or at least it shouldn't jump backwards)
When you search for a string inside a note, it finds the text as you type, which be useful sometimes, but in QOwnNotes is a big annoyance, because when you delete some characters in the find field it jump backwards to previous results, and if you delete all the searched string it jumps back to the beginning of the document. This is not only annoying, but it also prevents the user to search for a new string starting from a found text. For example, you search for "hello" and then you want to find the next occurrence of "world" starting from that point.
Can you please describe what you expected, what the actual behavior was, and step by step what you did?
Test Note
test
hello
John Doe
goodbye
use this tool
the quick brown for jumps over the lazy dog
List of users:
- Michael Fleming
- John Stone
- Peter Lee
- John Becker
- Paula Perkins
Steps to reproduce
- Open a note (like the one in the given example)
- Search for a string inside a note (CTRL+F)
- Type the string you want to search (for example: "user", without quotes )
- Delete a character (so that now it's "use" )
- Delete the whole text (so that now the Find in text field is empty )
- Type another string you want to search (for example: "John" )
Expected behaviour
- It jumps to the first occurrence of "user" (then you can use forward/backwards arrow to move to the next or previous occurrence of "user")
- It jumps to the first occurrence of "use" starting from the currently found word "user", and only if you click on the forward or backwards arrow.
- If you delete the whole searched string, the cursor still stays on the current position.
- Search for the new string starting from the current position.
Actual behaviour
- It searches as you type
- If you delete a character from the searched string it jumps backward to the first occurrence of the new string
- If you delete the whole searched string it jumps back at the beginning of the document.
- It's impossible to search for "user", and then for all the occurrences of "John" after that: when you delete the "Find in text" field, all strings will be searched from the beginning of the document, never from the current cursor position.
Note
You can test this example on basically any text editor, like Kate on Linux or Notepad on Windows, to see what the expected behaviour is.
Thank you. That's part of https://github.com/pbek/qmarkdowntextedit/.
It will be hard to get around that without regressions...