Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
butwerenotthereyet opened this issue Aug 27, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@butwerenotthereyet
Copy link
Contributor

butwerenotthereyet commented Aug 27, 2021

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
Copy link
Owner

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
Copy link
Owner

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.

@IngoMeyer441 IngoMeyer441 added the bug Something isn't working label Oct 21, 2021
@Futurile
Copy link

Futurile commented Jan 30, 2022

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:

  • XTerm (330) - fails - it jumps to the end of the scrollback [0/12] in the top right
  • XTerm (370) - fails - installed from Guix - same as above
  • Gnome Terminal (3.28.2) - fails - this is the Ubuntu 18.04 LTS one - same as XTerm
  • Alacritty 0.9.0 - fails - difference is it jumps to the search location, but doesn't keep the highlight
  • Kitty 0.20.3 - doesn't work - same as XTerm

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.

```
* Enter tmux-copy mode: <Prefix>
* Move using the vim keys to some line: start of line 4 'A host
* Start a selection (for me this is v): v
* Do a tmux-jump search for a character, say d: sd
* Fails here if there's more than one pane
* Copy the highlighted text: y



@IngoMeyer441
Copy link
Owner

@Futurile Thanks for your tests and your further investigation! 🙂
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
Copy link
Owner

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

@butwerenotthereyet
Copy link
Contributor Author

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

@veyzz
Copy link

veyzz commented Mar 31, 2023

Gentoo, kitty 0.26.5, tmux 3.3a.

The same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants