On Fri 15 Aug 2014 at 13:53:02 +0100, Christian Ebert wrote: > This might be related: > > http://sourceforge.net/p/tmux/mailman/message/31923537/ > ff.
Yep, looks like the exact same thing. There is a reason I have my erase character set to backspace. It is the result of year of use of different Unix systems using different terminals and different default settings for erase and intr. (Did you know that in early Unix systems, DEL was used as intr character?) So to harmonize, I just forced all systems to the same settings (preferably in such a way that I can copy config files from system to system with no or minimal modification). To show some more detail, these are my settings in a fresh xterm, and look at the different erase characters: murthe:~$ stty everything speed 38400 baud; 24 rows; 80 columns; lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff -ixany -imaxbel -ignbrk -brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl -oxtabs -onocr -onlret cflags: cread cs8 parenb -parodd hupcl -clocal -cstopb -crtscts -mdmbuf -cdtrcts discard dsusp eof eol eol2 erase intr kill lnext ^O ^Y ^D <undef> ^@ ^H ^C ^U ^V min quit reprint start status stop susp time werase 1 ^\ ^R ^Q ^T ^S ^Z 0 ^W and if I start a new tmux session murthe.0:~$ stty everything speed 9600 baud; 24 rows; 80 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl oxtabs onocr onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -mdmbuf -cdtrcts discard dsusp eof eol eol2 erase intr kill lnext ^O ^Y ^D <undef> ^@ ^? ^C ^U ^V min quit reprint start status stop susp time werase 1 ^\ ^R ^Q ^T ^S ^Z 0 ^W murthe.0:~$ cat ^?^? The cat command is where I typed ^V^H but instead of ^H I got ^?. This code is the culprit, in tty-keys.c line 553: /* * Check for backspace key using termios VERASE - the terminfo * kbs entry is extremely unreliable, so cannot be safely * used. termios should have a better idea. */ bspace = tty->tio.c_cc[VERASE]; if (bspace != _POSIX_VDISABLE && key == bspace) key = KEYC_BSPACE; Needless to say, I don't want to do a "stty erase undef" or "stty erase ^?" before starting tmux. Note that the value of KEYC_BSPACE is /* Backspace key. */ { KEYC_BSPACE, "\177", 0 }, which shows to my mind a misunderstanding. \177 (127 decimal) is not ASCII BS but ASCII DEL. On the one hand it is commendable that tmux tries to translate different environments to each other (trying to convert the erase character in this case) but I think it is misguided and causes more trouble than it is worth. And if it should be done, it should be done completely, including all other termios control characters. (And it should certainly not be done if the tty is in raw mode...) (On the other hand, it doesn't seem to translate characters if my inside terminal is in Latin-1 mode but my external terminal is in UTF-8 mode. Accented characters get mangled.) -Olaf. -- ___ Olaf 'Rhialto' Seibert -- The Doctor: No, 'eureka' is Greek for \X/ rhialto/at/xs4all.nl -- 'this bath is too hot.'
pgpxNmtZEZPnX.pgp
Description: PGP signature
------------------------------------------------------------------------------
_______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users