A while back I created a thread about tmux sending garbage characters to
screen when a click would occur past 220 characters in the terminal while
using Putty and some other terminals. Nicholas noted that the issue was not
with tmux but due to the terminal itself not supporting extended mouse mode
that tmux uses (xterm/DECSET 1005).

After some frustrations and research, I've forked Putty to create a fix for
this. There was an existing patch for Putty floating around on the internet
implementing DECSET 1015 mode, but nothing for 1005. Using that patch as a
guide, I've created my own, which supports all 4 of the existing mouse
modes (1000/1005/1006/1015). If you're using stock Putty with TMUX, you can
get the patch from here and apply it (patch is based on Putty 0.62, so it
might not be compatible with other Putty derivatives):

https://github.com/atsepkov/putty-X/commit/d57d1a582aed66b61737cf5c496dd74e86cb6cab.patch

There is now also a safety mechanism, so that if the application doesn't
support correct DECSET, Putty will not send anything beyond the supported
boundary limits rather than sending garbage sequences.

If you want additional bells and whistles like most other Putty derivatives
offer, I suggest you try the latest version of the same Putty-X project,
which adds the following features (mostly inspired by Mintty, Putty-Tray,
and Urxvt):

- Support for meta-key modifiers for arrow keys, function keys, and some
others
- Transparency
- Support for hyperlinks
- Saving/loading sessions from files in addition to the registry
- Ability to read config from Xresources file (I did this to reuse my Urxvt
settings)
- Support for italic font (I only added this to the Windows version, but
hooks are now there for others)
- Better rendering of bold fonts (no jagged edges, color is now independent
from boldness)

The goal was basically to create similar experience on my Windows pc at
work to my Linux pc running urxvt at home when running tmux. I figured this
would benefit others as well.
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to