Download raw body.
Console regression in 7.5 due to missing ECMA-48 REP capability
A regression was introduced during the 7.5 development cycle by the curses
updates.
At the beginning of last year I submitted various patches to the framebuffer
console code, and as a result both 7.3-release and 7.4-release allow the use
of the xterm terminal emulation on the framebuffer console.
This is very desirable for various reasons that have been discussed on and off
list in the past.
However the use of TERM=xterm on the console no longer works on a fresh
install of 7.5-release. The reason is that programs compiled with curses now
use the CSI b escape sequence which repeats the previously printed character
the specified number of times.
Xterm supports this, but the framebuffer console does not.
The attached patch is a quick kludge to make the console usable again with
TERM=xterm. It doesn't handle a repeat sequence that causes the output to
wrap to the next line, but works well enough to make, E.G. mutt and vi
usable.
Of course, the fact that nobody has yet complained about this breakage on
the lists suggests that use of TERM=xterm on the console is not yet
widespread.
Why not?
Were there problems with it in 7.3 and 7.4 that I missed?
Or are people just not aware that it's now supposed to work?
--- wsemul_vt100.c.dist Wed Aug 2 20:20:19 2023
+++ wsemul_vt100.c Mon May 27 16:49:50 2024
@@ -394,6 +394,8 @@
}
}
+edp->last_printed_char=dc;
+
#ifdef HAVE_DOUBLE_WIDTH_HEIGHT
WSEMULOP(rc, edp, &edp->abortstate, putchar,
(edp->emulcookie, edp->crow, edp->ccol << edp->dw, dc,
--- wsemul_vt100_subr.c.dist Sun Feb 26 15:09:53 2023
+++ wsemul_vt100_subr.c Mon May 27 16:56:40 2024
@@ -468,6 +468,14 @@
edp->crow += min(DEF1_ARG(0), n);
CHECK_DW;
break;
+ case 'b': /* Repeat previously printed character */
+ for (m=0; m<DEF1_ARG(0); m++) {
+ WSEMULOP(rc, edp, &edp->abortstate, putchar,
+ (edp->emulcookie, edp->crow, edp->ccol << edp->dw,
+ edp->last_printed_char, edp->curattr));
+ edp->ccol += min(1, COLS_LEFT);
+ }
+ break;
case 'C': /* CUF */
edp->ccol += min(DEF1_ARG(0), COLS_LEFT);
break;
--- wsemul_vt100var.h.dist Mon Mar 6 17:14:44 2023
+++ wsemul_vt100var.h Mon May 27 16:45:26 2024
@@ -99,6 +99,7 @@
#else
u_char translatebuf[1];
#endif
+ uint32_t last_printed_char;
};
/* some useful utility macros */
Console regression in 7.5 due to missing ECMA-48 REP capability