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

Multiple search results highlighted with active color #650

Open
jdujava opened this issue Jul 31, 2024 · 3 comments
Open

Multiple search results highlighted with active color #650

jdujava opened this issue Jul 31, 2024 · 3 comments

Comments

@jdujava
Copy link
Contributor

jdujava commented Jul 31, 2024

Performing search highlights initially ALL first occurences on different pages with highlight-active-color.
image
This persist even after pressing n/N for the next/previous search result. It only gets partially fixed after the actual current entry gets on the next page (since on previous page all search results will be left highlighted with highlight-color).

In my opinion, at all times only the real current search result should be highlighted with the active color.

@jdujava
Copy link
Contributor Author

jdujava commented Jul 31, 2024

I would propose the following behavior for searching:

  • only highlight one "real" current search result
  • as long as it stays in the visible range, search next/previous will go to the next/previous result relative to it, regardless if we scrolled to some other page in a meantime
  • only after the current search result goes out of the visible range, we reset it, and the next invocation of search next/previous starts from the top/bottom of the current page

What are your thoughts?

@alerque
Copy link

alerque commented Jul 31, 2024

I would not "jump" start the search at a new location unless an explicit action to relocate is made. Scrolling the view should not do that even if the current match goes out of view. An explicit click inside a page of page jump key might do that, but the action would have to have the expectation of moving the focus. In almost every editor/browser/etc. I can think of works this way, and not only is it habitual to expect the focus jumps back to the match instead of the other way around but also useful.

@jdujava
Copy link
Contributor Author

jdujava commented Jul 31, 2024

Sure, that would certainly work too (and perhaps is actually better). I just tried to come up with something more similar to the way zathura works now, but maybe such considerations shouldn't be entertained.

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

No branches or pull requests

2 participants