reassign 477455 vte retitle 477455 vte: backspace-autodetect mode uses c_cc[VERASE] even when ICANON|ECHOE unset thankyou
Hi,
> With some terminals, such as xfce4-terminal (Debian package) and
> osso-xterm (not in Debian), screen views the Backspace key as the
> nul character (^@), so that it is not possible to erase characters
> with it.
this is not screen's fault. screen disables most control code translations
on its "outer" fd (the one inherited from the invoking shell, which is
directly fed by the X terminal emulator) by calling tcsetattr():
] ioctl(3, TCGETS, {c_iflags=0x500, c_oflags=0x5, c_cflags=0xbf,
c_lflags=0x8a3b, c_line=0, c_cc...})
] ioctl(3, TCSETSW, {c_iflags=0x400, c_oflags=0x1, c_cflags=0xbf,
c_lflags=0xa30, c_line=0, c_cc...})
] ioctl(3, TCGETS, {c_iflags=0x400, c_oflags=0x1, c_cflags=0xbf,
c_lflags=0xa30, c_line=0, c_cc...})
The new c_lflags value expands to {ECHOE|ECHOK|ECHOCTL|ECHOKE}.
ECHOE,ECHOK and ECHOPRT depend on ICANON (which is unset), ECHOCTL depends on
ECHO
(which is also unset), so these bits (ought to) have no effect. Yet libvte
unconditionally uses c_cc[VERASE] for backspace:
] vte:src/vte.c:4330 ff.
] case VTE_ERASE_AUTO:
] default:
] if (terminal->pvt->pty_master != -1) {
] if (tcgetattr(terminal->pvt->pty_master,
] &tio) != -1) {
] normal = g_strdup_printf("%c",
] tio.c_cc[VERASE]);
] normal_length = 1;
] }
] }
] suppress_meta_esc = FALSE;
] break;
] }
] handled = TRUE;
But screen sets that member to ascii NUL (because it shouldn't be used
anyway).
Regards,
Jan
signature.asc
Description: Digital signature

