pwmt / zathura

Document viewer
https://pwmt.org/projects/zathura
zlib License
2.05k stars 141 forks source link

Multiple search results highlighted with active color #650

Open jdujava opened 2 months ago

jdujava commented 2 months ago

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 commented 2 months ago

I would propose the following behavior for searching:

What are your thoughts?

alerque commented 2 months ago

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 commented 2 months ago

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.