tmux / tmux

tmux source code
Other
34.38k stars 2.09k forks source link

Tmux Copy Mode - Unexpected Exit/Crash #3992

Closed michalspano closed 3 months ago

michalspano commented 3 months ago

Issue description

I'm receiving an error (which I find difficult to trace) when entering the Copy mode of tmux (i.e., selecting text and copying it to system's clipboard). I type Control-A (my default prefix) followed by [ to enter the mode, which works fine. I'm using the vi keybinds, so I navigate around some text, press space, make a selection, and press enter. Upon pressing enter, the tmux server seems to crash unexpectedly. There's only the following error message provided:

[server exited unexpectedly]

I recently upgraded to tmux 3.3a; this issue did not seem to happen before, so it could be related to that. I inspected the CHANGES file, but didn't find a similar error (or its resolution).

Required information

Please provide the following information:

tmux 3.3a
Darwin i386
xterm-256color

None

michalspano commented 3 months ago

I've updated the issue's description to provide more insights into the described issue. Any additional help will be appreciated.

nicm commented 3 months ago

Does this still happen if you build tmux from master?

michalspano commented 3 months ago

Does this still happen if you build tmux from master?

Not anymore, actually.

I updated my version of tmux to 3.4 and the issue seems to be resolved. I've tried to build it from scratch using the master branch and the issue was resolved too. It must have been something specifically with the previous version tmux 3.3a that was causing this trouble.

I'll then close the issue as it seems that the issue has been resolved in the latest version anyway.

DuldR commented 3 months ago

I was also having this same issue on 3.3a. Upgrading to 3.4 fixed it for me. I'm on MacOS Ventura 13.3.1 with the following mouse copy configuration:

set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi    C-WheelUpPane   send-keys -X halfpage-up
bind -T copy-mode-vi    C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane   send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down

# Copy and Paste Config
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"

Thank you for all the hard work you put into tmux!

github-actions[bot] commented 2 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed.