htop icon indicating copy to clipboard operation
htop copied to clipboard

mouse support behaving incorrectly in tmux

Open martinus opened this issue 1 year ago • 2 comments

Mouse support for htop works perfectly when not in tmux. But when inside tmux, clicks seem to be captured incorrectly. For whatever reason it always opens the "Sort by" menu, regardless where I click. Other applications like btop register clicks correctly.

I've suspected my tmux configuration is the cause, but I have the same behavior when I remove my tmux config. I'm using tmux next-3.4 and htop 3.3.0 on Fedora Linux 39.

martinus avatar Mar 19 '24 06:03 martinus

I just discovered it works with TERM=screen htop. The default term for tmux nowadays seems to be tmux-256color, and it doesn't work with that.

martinus avatar Mar 19 '24 06:03 martinus

Cannot reproduce with tmux 3.3a, TERM=tmux-256color as provided by Debian 12 (bookworm). On that setup the mouse clicks work as expected.

fasterit avatar Mar 19 '24 12:03 fasterit