roblabla / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

Home/end keys not working properly unless on xterm-vt220 #382

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi

I have problems when I'm using mintty to ssh to a machine and run tmux then 
vim. When I'm inside vim (which is inside tmux which is inside ssh), the home 
and end keys work *sometimes*, but sometimes they print some characters on the 
screen.

If I configure mintty to use xterm-vt220, then the home/end keys work fine. The 
problem is that with xterm-vt220 I can't have 256 colors, and I constantly rely 
on a 256-color terminal, especially when using vim.

Why does it work with xterm-vt220 but not with xterm and xterm-256color? Is 
there any quirk/hack I can do to make the home/end keys behave like xterm-vt220 
when I'm using xterm-256color?

I have tried increasing tmux's "escape-time" option to really huge timeouts and 
it doesn't really fix the bug. From the man page: "escape-time sets the time in 
milliseconds for which tmux waits after an escape is input to determine if it 
is part of a function or meta key sequences. The default is 500 milliseconds.".

What steps will reproduce the problem?
1. Configure mintty to use xterm or xterm-256color
2. ssh to some Linux machine
3. Run tmux
4. Run vim
5. Type some text
6. Keep pressing home/end quickly
7. Notice that sometimes it works, but sometimes it prints some characters
8. Configure mintty to use xterm-vt220, run steps 2-7 and notice the problem 
doesn't happen.

What is the expected output? What do you see instead?
I expect home/end to behave as they should, but what I see is that sometimes 
they behave as they should, but sometimes they print characters on the text.

What versions of mintty, Cygwin/MSYS, and Windows are you using?
Mintty 1.1.2. I'm not sure which Cygwin version, I installed it very recently. 
Windows 7.

Please provide any additional information below.
Thank you for your support!

Original issue reported on code.google.com by przan...@gmail.com on 8 Apr 2013 at 1:33

GoogleCodeExporter commented 9 years ago
I've been looking into a semi related issue and thought I'd throw this possible 
solution out there for you.  In my reading I came across 
https://www.digitalocean.com/community/articles/how-to-configure-tmux-on-a-cloud
-server and thought their suggestion of set-option -sg escape-time 0 may help 
you.  

I'm looking into my own issue where I'm mintty -> ssh -> tmux and tmux won't 
recognize Ctrl+b or Ctrl+a.  Still haven't figured it out..

Original comment by Justin.J...@gmail.com on 4 Dec 2013 at 6:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Like 'screen', apparently also 'tmux' uses different escape sequences; it's 
more likely a tmux configuration issue, not a mintty issue; (also tmux is 
missing in the bug title as it significantly contributes to the issue).

Original comment by towom...@googlemail.com on 20 Mar 2014 at 1:06