This question is similar but not identical to tmux -- any way to enable scrolling, but not selection?
I'm using tmux within gnome-terminal. When I use setw -g mode-mouse on
in tmux to enable scrolling through the history buffer, tmux doesn't respect the copy/paste functionality in X, i.e. selecting text does not place the text in the primary buffer, and I can't paste using the middle mouse button
When I press the middle mouse button, I see coordinates in the upper right corner of the screen -- it looks like it's trying to register a middle mouse click as use of the scroll wheel.
Are there tmux settings that I can use to fix this? Are the scroll wheel and the middle mouse buttons seen as independent in tmux? Can I map middle mouse button to OS paste? Can tmux copy/paste request from/feed to OS paste?
Answer
Actually, the answer was hidden among the possibilities listed in tmux -- any way to enable scrolling, but not selection?:
You have the following options:
- set up a keyboard short-cut that copies the tmux selection into yoursystem clipboard
- use a terminal that supports set-clipboard function, such as xterm
- disable any use of the mouse in tmux
I googled forset-clipboard
and ran across http://grota.github.io/blog/2012/05/08/tmux-clipboard-integration/ which is what I wanted, if not what I asked for.
No comments:
Post a Comment