Merged requested to merge rahulaggarwal965/zathura:feature/selection into develop
This PR replaces the current text selection rectangle functionality with "proper" selection between two points. It requires zathura-pdf-mupdf!8 (merged) to be merged. It does a couple of things:
- When the mouse is pressed and dragged, it will track the base point and the end point to form a selection rectangle.
- It will use a new plugin exposed in zathura-pdf-mupdf!8 (merged) to collect all the rectangles that represent a "proper selection" between said points.
- It will calculated the redraw area (it will have the page x bounds and it iterates over the rectangles to calculate y-bounds).
- It then clears the previous drawn selection rectangles and draws the new ones.
I have created a new struct on the
selection to keep track of this data.
There are possibly a couple things that could be improved such as highlighting on latex math symbols, but this is definitely a great start.
Here is a picture of the result: