tmux-plugins / tmux-sensible

basic tmux settings everyone can agree on
MIT License
1.73k stars 90 forks source link

Garbage on init and mouse clicks broken #17

Open gdw2 opened 9 years ago

gdw2 commented 9 years ago

I don't suspect this is a tmux-sensible problem per se, but just looking for help. When I run tmux, I get a prompt that looks like this:

[gdw@gdw2 ~]$ 1;2c

If I click my mouse, something that looks like this is printed to the console:

[gdw@gdw2 ~]$ 0;24;5M0;24;5m

If I comment out these lines in the sensible plugin, then I have no problems: https://github.com/tmux-plugins/tmux-sensible/blob/master/sensible.tmux#L76-L79

Any ideas why these lines would cause this behavior? My tmux.conf is blank except for the sensible, yank,and copycat plugins.

gdw2 commented 9 years ago

Here's a clue: https://code.google.com/p/mintty/issues/detail?id=395#c6

(I'm also using cygwin/mintty etc)

I'm guessing the mouse events are simulated using escape keys? A workaround is to set the escape time to a non-zero value:

set-option -s escape-time 10

Though, when I set it to 10, I still see the symptoms when clicking, just not as often. I can live with it.

bruno- commented 9 years ago

Hey, sorry for responding so slow. Would you consider opening a pull request that detects if a user is uses cygwin and sets escape-time to an acceptable value?

That way, we fixed the issue for all cygwin users - what do you say?

gdw2 commented 9 years ago

I'm experiencing this issue using tmux on remote hosts. Can a remote host tell that I'm using cygwin? Not sure if this issue exists for local cygwin tmux sessions.

bruno- commented 9 years ago

My experience and access to Cygwin are really limited. I'm not sure I know the answer to that.

Can you please update this thread if you find more?