vishwakulkarni / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

New line redraw problems in tmux #607

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run tmux
2. Press enter in the blank shell

You might expect to see:

    eevee@hostname ~ $
    eevee@hostname ~ $ _

Instead I get this slightly bizarre output:

    eevee@hostname ~ $
                       _
    eevee@hostname ~ $

The cursor is in the right place, but the line is blank, and the text appears 
on the line following.  If I keep pressing enter, I get another blank line and 
the errant shell prompt moves down one row.

I've observed similar behavior with new messages arriving in irssi and lines 
wrapping in vim.  Only seems to be a problem within tmux.  Ctrl-L in irssi/vim 
fixes the display, as does switching to another tmux window and back.

Same behavior in current ConnectBot (Oct 2010, on the market), trunk 
ConnectBot, and current VX ConnectBot.

SSH server is Arch Linux running tmux 1.6.  ConnectBot is set to emulate 
xterm-256color.

Original issue reported on code.google.com by lexyee...@gmail.com on 23 Sep 2012 at 3:00

GoogleCodeExporter commented 8 years ago
It seems the problem is related to TERM being screen-256color inside tmux; if I 
change it to xterm-256color, zsh immediately behaves.

I don't know what the difference could possibly be; tmux should be intercepting 
anything screen-like and translating to xterm.  I considered window titles, but 
zsh still exhibits the problem if I disable everything related to 
xterm/screen/tmux titles.

`infocmp screen-256color xterm-256color` produces, sans several dozen kf* 
sequences that don't exist in screen:

comparing screen-256color to xterm-256color.
    comparing booleans.
        bce: F:T.
        ccc: F:T.
        mc5i: F:T.
        npc: F:T.
    comparing numbers.
    comparing strings.
        acsc: '++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~', '``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~'.
        clear: '\E[H\E[J', '\E[H\E[2J'.
        cnorm: '\E[34h\E[?25h', '\E[?12l\E[?25h'.
        cuu1: '\EM', '\E[A'.
        cvvis: '\E[34l', '\E[?12;25h'.
        ech: NULL, '\E[%p1%dX'.
        enacs: '\E(B\E)0', NULL.
        flash: '\Eg', '\E[?5h$<100/>\E[?5l'.
        hpa: NULL, '\E[%i%p1%dG'.
        indn: NULL, '\E[%p1%dS'.
        initc: NULL, '\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\'.
        invis: NULL, '\E[8m'.
        is2: '\E)0', '\E[!p\E[?3;4l\E[4l\E>'.
        kDC: NULL, '\E[3;2~'.
        kEND: NULL, '\E[1;2F'.
        kHOM: NULL, '\E[1;2H'.
        kIC: NULL, '\E[2;2~'.
        kLFT: NULL, '\E[1;2D'.
        kNXT: NULL, '\E[6;2~'.
        kPRV: NULL, '\E[5;2~'.
        kRIT: NULL, '\E[1;2C'.
        kb2: NULL, '\EOE'.
        kend: '\E[4~', '\EOF'.
        kent: NULL, '\EOM'.
        khome: '\E[1~', '\EOH'.
        kind: NULL, '\E[1;2B'.
        kri: NULL, '\E[1;2A'.
        mc0: NULL, '\E[i'.
        mc4: NULL, '\E[4i'.
        mc5: NULL, '\E[5i'.
        meml: NULL, '\El'.
        memu: NULL, '\Em'.
        nel: '\EE', NULL.
        rin: NULL, '\E[%p1%dT'.
        rmacs: '^O', '\E(B'.
        rmam: NULL, '\E[?7l'.
        rmm: NULL, '\E[?1034l'.
        rmso: '\E[23m', '\E[27m'.
        rs1: NULL, '\Ec'.
        rs2: '\Ec\E[?1000l\E[?25h', '\E[!p\E[?3;4l\E[4l\E>'.
        sgr: '\E[0%?%p6%t;1%;%?%p1%t;3%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;', '%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m'.
        sgr0: '\E[m\017', '\E(B\E[m'.
        smacs: '^N', '\E(0'.
        smam: NULL, '\E[?7h'.
        smm: NULL, '\E[?1034h'.
        smso: '\E[3m', '\E[7m'.
        u6: NULL, '\E[%i%d;%dR'.
        u7: NULL, '\E[6n'.
        u8: NULL, '\E[?1;2c'.
        u9: NULL, '\E[c'.
        vpa: NULL, '\E[%i%p1%dd'.

Also of note: bash (with my distro's defaults) does not have this problem, but 
zsh -f (which ignores all .zshrc files) still does.

#88 sounds like how irssi behaves for me, as well.

Original comment by lexyee...@gmail.com on 23 Sep 2012 at 3:31

GoogleCodeExporter commented 8 years ago
I see the same problem with garbled output, using ConnectBot from the market 
and tmux 1.7 on the remote server. CB also set to emulating xterm-256color.

Original comment by sdelaf...@gmail.com on 17 Mar 2013 at 2:40

GoogleCodeExporter commented 8 years ago
Just tried ConnectBot VX, with the same exact settings and no change at all on 
the server, and the output is perfect. After 4 years of using CB, I guess I'm 
going to switch to the VX version :)

Original comment by sdelaf...@gmail.com on 17 Mar 2013 at 3:17