Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Search for a text inside a Note (find as you type should be optional, or at least it shouldn't jump backwards) #2869

Open
ElfQrin opened this issue Oct 2, 2023 · 3 comments

Comments

@ElfQrin
Copy link

ElfQrin commented Oct 2, 2023

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.

@pbek
Copy link
Owner

pbek commented Oct 2, 2023

Can you please describe what you expected, what the actual behavior was, and step by step what you did?

@ElfQrin
Copy link
Author

ElfQrin commented Oct 2, 2023

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.

@pbek
Copy link
Owner

pbek commented Oct 3, 2023

Thank you. That's part of https://github.com/pbek/qmarkdowntextedit/.

It will be hard to get around that without regressions...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants