IngoMeyer441 / tmux-easy-motion

Vim's easy-motion for tmux
MIT License
81 stars 6 forks source link

tmux 3.2: Multi-pane window cancels selection when moving by tmux-easy-motion #15

Open butwerenotthereyet opened 3 years ago

butwerenotthereyet commented 3 years ago

In tmux 3.2, if a window has multiple panes, when you begin a selection and then move via tmux-easy-motion, your selection is cancelled, preventing you from selecting a region via tmux-easy-motion.

These screenshots were taken in a tmux 3.2 client running in Alacritty on macOS. It was launched like this:

$ cat /tmp/tmux.easymotion.conf
set -g @easy-motion-copy-mode-prefix-enabled "1"
set -g @easy-motion-copy-mode-prefix "s"
set -g @easy-motion-prefix-enabled "0"
set -g @easy-motion-dim-style "fg=colour242"
set -g @easy-motion-highlight-style "fg=colour196,bold"
set -g @easy-motion-highlight-2-first-style "fg=#ffb400,bold"
set -g @easy-motion-highlight-2-second-style "fg=#b98300,bold"
run-shell "/tmp/tmux-easy-motion/easy_motion.tmux"
$ tmux -V
tmux 3.2
$ tmux -L test -f /tmp/tmux.easymotion.conf

Starting from a session with a single window split vertically where the left pane has man tmux running, enter copy mode, jump to a character, begin selection, move a little to see that the selection is active, then use tmux-easy-motion, and jump to a different character. At this point, you will see that the selection has been cancelled.

1 2 3 4 5 7 8 9

IngoMeyer441 commented 3 years ago

I tried this on my development machine (Manjaro Linux, kitty terminal and tmux 3.2a), but could not reproduce this behavior yet. I am going to install your environment on a fresh macOS VM. Maybe, there are some differences between platforms or terminal emulators.

IngoMeyer441 commented 3 years ago

I could reproduce the problem on macOS with Alacritty and the default terminal and on Ubuntu 20.04 with the GNOME terminal. So it seems to be indepedent from the operating system and the terminal emulator.

Futurile commented 2 years ago

I'm using tmux 3.21. I think it's something to do with how Tmux is handling the terminal emulator, as I have a consistent fail:

Here is some example text:

My thoughts meander along (blown round unbound) the poets verse:

        I wandered lonely as a cloud
        That son high o'er vales and hills,
        When all at once I saw a crowd,
        A host, of golden daffodils;
        Beside the lake, beneath the trees,
        Fluttering and dancing in the breeze.
IngoMeyer441 commented 2 years ago

@Futurile Thanks for your tests and your further investigation! :slightly_smiling_face: I tried your instructions on Manjaro Linux, kitty 0.24.1 and tmux 3.2a, but still I cannot reproduce this error on my development machine (but I suspect it also broken for me on my Mac VM). I really would like to fix this issue, but I have still no idea what is going on here...

IngoMeyer441 commented 2 years ago

Does tmux-easy-motion often fail for you @butwerenotthereyet and @Futurile when multiple panes are involved?

butwerenotthereyet commented 2 years ago

@IngoMeyer441 Yes, it fails very often when there are multiple panes involved.

veyzz commented 1 year ago

Gentoo, kitty 0.26.5, tmux 3.3a.

The same issue.