abhinav / tmux-fastcopy

easymotion-style text copying for tmux.
GNU General Public License v2.0
66 stars 5 forks source link

fix: Don't hang when destroy-unattached is set #171

Closed abhinav closed 1 year ago

abhinav commented 1 year ago

tmux supports a session option 'destroy-unattached' which, when set, terminates unattached sessions very quickly.

This is a problem for tmux-fastcopy because it places its temporary window in an unattached session so as not to have a flicker at the bottom of the user's current session.

Unfortunately, there doesn't appear to be an obvious/easy way to spawn a session with the option unset just for it. As a workaround, if the user has destroy-unattached set, the wrapper program will temporarily disable it, and re-enable it after tmux-fastcopy exits.

Resolves #160