pwmt / zathura

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

Bring back rectangle selection in a form of a highlighter - [merged] #543

Closed sebastinas closed 2 months ago

sebastinas commented 9 months ago

On GitLab by @marcoe on Sep 14, 2023, 17:42


Merges feature-highlighter -> develop

This MR aims to bring back the rectangle selection in a form of a highlighter that can be drawn while holding the left mouse button and Ctrl simultaneously. Unlike the previous rectangle selection, it is not meant to select text to copy, but to offer a persistent highlighted region until the user clicks somewhere and clears it.

The use cases for this feature are discussed in issue #346 and partially in #302 and #281.

Caveats

closes #346 closes #281

sebastinas commented 9 months ago

mentioned in commit 9ab68dd1ee3640e56e4e4575112fcae44f8e40ca

sebastinas commented 9 months ago

On GitLab by @gi1242 on Sep 18, 2023, 14:42


Thanks so much; I just wanted to point out that this behavior might conflict with the current inverse search feature. Currently, pressing Ctrl+click opens the users editor to the corresponding portion in the LaTeX file.

If the user starts a Ctrl+drag and changes their mind, it would be registered as a Ctrl+click and open the users editor. (May be disruptive in the middle of a presentation.) Also, there may be times where Ctrl+drag is registered as a Ctrl+click.

Would you consider doing something to avoid this potential conflict? For instance, allow Ctrl to be configured; or alternately, change the inverse search modifier to Shift (Okular uses Shift+click for inverse search.)

Thanks again for implementing this.

sebastinas commented 9 months ago

On GitLab by @marcoe on Sep 19, 2023, 13:24


Thank you for pointing this out. It does indeed cause a modifier conflict. I have set to resolve it in !83.