Closed butwerenotthereyet closed 3 years ago
Do you have an example? I am a bit suprised since I use tmux-easy-motion often to extend an active selection. Before commit 228a073b855e2aa8c2d4e6c29b4dcbb72c9880a4 the selection was cleared when the current pane was zoomed but this should be fixed now.
Not able to show example of original problem now, but here are some related issues. Maybe original problem has the same cause?
Cat a big file with long lines and go to top-left:
Start target-letter mode (s
s
in the image):
Target a letter (c
)
Choose the first target letter (n
in the image):
💥 The wrapping is funny. Did new characters get inserted rather than original characters being replaced?
Choose the second letter (s
in the image):
Start a selection (space
in the image):
Move a bit to see that selection is active (f
space
in the image):
Start target-letter mode (s
s
in the image):
Target a letter (l
in the image):
Choose the first target letter (f
in the image):
Choose the second letter (e
in the image):
💥 Highlighting is funny. Is this from long lines getting longer?
Move up a line or two:
Then move down:
💥 Highlighting is funnier.
Moving down over the end of the fake highlighting fix the problem:
Updated title to be accurate.
Ok, I think I found the problem. Multiple targets with the same text position were printed one after another which led to a text shift (for example when searching for c
in occaecat
). Now targets with the same text position are sorted and only the first target is shown on screen (commit a8d4ddc68eaca07a79704aca082a85687d629984).
That should also fix the weird selection rendering issues.
This is fantastic! Thank you!! (I repeated the steps above and the bug is fixed.) The long line extending had other effects too like making tmux-easymotion hard to use when scrolled--that's fixed too!
Thanks for reporting and testing!
Hopefully, it is now ready for use in the daily workflow. :smile:
If easy-motion is started in copy-mode when a selection (or block selection) is active, the selection is discarded. It would be neat to create selection using tmux-easy-motion to define the beginning and end.