ui/console-vc: various fixes and improvements
cover ui/console-vc: various fixes and improvements
This patch series brings several fixes and improvements to the QEMU virtual console (VC), making it more usable and aligning it better with VT100 spec. The updates include support for inserting and deleting characters, better cursor handling and correct position reporting. Without these changes, the console is hardly usable.
1. Support for DCH (delete) and ICH (insert) commands
* Properly handles character deletion and insertion as per VT100 specs.
2. Add support for cursor save/restore (ESC 7 and ESC 8)
* Implements legacy DEC sequences for compatibility.
* Ensures cursor attributes are also saved and restored.
3. Fix cursor position reporting
* Reports cursor position relative to the screen instead of the scroll buffer.
* Fixes issues with tools that rely on accurate cursor placement.
4. Ensure DSR (Device Status Report) responses go to applications
* Stops terminal from rendering responses to the screen but instead send reports back to applications.
5. Handle ESC ( <ch> character set sequences
* Makes top output look clean by handling the character set commands.
These changes improve the virtual console's compatibility with terminal-based apps. Without them, the console is quite frustrating to use.
Roman Penyaev (5):
ui/console-vc: introduce parsing of the 'ESC ( <ch>' sequence ui/console-vc: report to the application instead of screen rendering ui/console-vc: report cursor position in the screen not in the scroll
buffer
ui/console-vc: add support for cursor DECSC and DECRC commands ui/console-vc: implement DCH (delete) and ICH (insert) commands
ui/console-vc.c | 174 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 156 insertions(+), 18 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/5 ui/console-vc: introduce parsing of the 'ESC ( <ch>' sequence
This change introduces parsing of the 'ESC ( <ch>' sequence, which is supposed to change character set [1]. In the QEMU case, the introduced parsing logic does not actually change the character set, but simply parses the sequence and does not let output of a tool to be corrupted with leftovers: top sends 'ESC ( B', so if character sequence is not parsed correctly, chracter 'B' appears in the output:
Btop - 11:08:42 up 5 min, 1 user, load average: 0BB
Tasks:B 158 Btotal,B 1 Brunning,B 157 Bsleeping,B 0 BsBB
%Cpu(s):B 0.0 Bus,B 0.0 Bsy,B 0.0 Bni,B 99.8 Bid,B 0.2 BB
MiB Mem :B 7955.6 Btotal,B 7778.6 Bfree,B 79.6 BB
MiB Swap:B 0.0 Btotal,B 0.0 Bfree,B 0.0 BB
PID USER PR NI VIRT RES SHR S B B 735 root 20 0 9328 3540 3152 R B B 1 root 20 0 20084 10904 8404 S B
B 2 root 20 0 0 0 0 S B
[1] https://vt100.net/docs/vt100-ug/chapter3.html#SCS
--- ui/console-vc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
ui/console-vc.c +16 -0
@@ -42,6 +42,8 @@ enum TTYState {TTY_STATE_NORM ,TTY_STATE_ESC ,TTY_STATE_CSI , +TTY_STATE_G0 , + TTY_STATE_G1, }; typedef struct QemuTextConsole {
@@ -694,6 +696,10 @@ static void vc_putchar(VCChardev *vc, int ch) vc->esc_params[i] =0 ; vc->nb_esc_params =0 ; vc->state =TTY_STATE_CSI ; + }else if (ch =='(' ) { + vc->state =TTY_STATE_G0 ; + }else if (ch ==')' ) { + vc->state =TTY_STATE_G1 ; }else { vc->state =TTY_STATE_NORM ; }
@@ -844,6 +850,16 @@ static void vc_putchar(VCChardev *vc, int ch) }break ; } +break ; +case TTY_STATE_G0 :/* set character sets */ +case TTY_STATE_G1 :/* set character sets */ +switch (ch) { +case 'B' : +/* Latin-1 map */ +break ; + } + vc->state =TTY_STATE_NORM ; +break ; } }
Signature · 1 line
2.43.0
PATCH 2/5 ui/console-vc: report to the application instead of screen rendering
In reply to Roman PenyaevTerminal Device Status Report (DSR) [1] should be sent to an application, not rendered to the screen. This patch fixes rendering of terminal report, which appears only on the graphical screen of the terminal (console "vc") and can be reproduced by the following command:
echo -en '\e[6n'; IFS='[;' read -sdR _ row col; echo $row:$col
Command requests cursor position and waits for terminal response, but instead, the response is rendered to the graphical screen and never sent to an application.
Why bother? Busybox shell (ash) in Alpine distribution requests cursor position on each shell prompt (once <ENTER> is pressed), which makes a prompt on a graphical screen corrupted with repeating Cursor Position Report (CPR) [2]:
[root@alpine ~]# \033[57;1R]
Which is very annoying and incorrect.
[1] https://vt100.net/docs/vt100-ug/chapter3.html#DSR
[2] https://vt100.net/docs/vt100-ug/chapter3.html#CPR
--- ui/console-vc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
ui/console-vc.c +3 -4
@@ -617,10 +617,9 @@ static void vc_put_one(VCChardev *vc, int ch)static void vc_respond_str (VCChardev *vc,const char *buf) { -while (*buf) { -vc_put_one (vc, *buf); - buf++; - } +QemuTextConsole *s = vc->console; + +qemu_chr_be_write (s->chr, (const uint8_t *)buf,strlen (buf)); }/* set cursor, checking bounds */
Signature · 1 line
2.43.0
PATCH 3/5 ui/console-vc: report cursor position in the screen not in the scroll buffer
In reply to Roman PenyaevThe format of the CSI cursor position report is ESC[row;columnR, where row is a row of a cursor in the screen, not in the scrollback buffer. What's the difference? Let's say the terminal screen has 24 lines, no matter how long the scrollback buffer may be, the last line is the 24th.
For example the following command can be executed in xterm on the last screen line:
$ echo -en '\e[6n'; IFS='[;' read -sdR _ row col; echo $row:$col 24:1
It shows the cursor position on the current screen and not relative to the backscroll buffer.
Before this change the row number was always increasing for the QEMU VC and represents the cursor position relative to the backscroll buffer.
--- ui/console-vc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
ui/console-vc.c +1 -2
@@ -827,8 +827,7 @@ static void vc_putchar(VCChardev *vc, int ch)case 6 :/* report cursor position */ response =g_strdup_printf ("\033[%d;%dR" , - (s->y_base + s->y) % s->total_height +1 , - s->x +1 ); + s->y +1 , s->x +1 );vc_respond_str (vc, response);break ; }
Signature · 1 line
2.43.0
PATCH 4/5 ui/console-vc: add support for cursor DECSC and DECRC commands
In reply to Roman PenyaevThere are aliases for save and restore cursor commands:
* save cursor
ESC 7 (DEC Save Cursor [1], older VT100)
ESC [ s (CSI Save Cursor, standard ANSI)
* load cursor
ESC 8 (DEC Restore Cursor [2], older VT100)
ESC [ u (CSI Restore Cursor, standard ANSI)
This change introduces older DEC sequencies for compatibility with some scripts (for example [3]) and tools.
This change also adds saving and restoring of character attributes, which is according to the VT spec [1][2]
[1] https://vt100.net/docs/vt510-rm/DECSC.html
[2] https://vt100.net/docs/vt510-rm/DECRC.html
[3] https://wiki.archlinux.org/title/Working_with_the_serial_console#Resizing_a_terminal
--- ui/console-vc.c | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-)
ui/console-vc.c +34 -6
@@ -90,6 +90,7 @@ struct VCChardev {int esc_params[MAX_ESC_PARAMS ];int nb_esc_params;TextAttributes t_attrib;/* currently active text attributes */ +TextAttributes t_attrib_saved;int x_saved, y_saved; };typedef struct VCChardev VCChardev ;
@@ -644,6 +645,31 @@ static void vc_set_cursor(VCChardev *vc, int x, int y) s->y = y; } +/** +* vc_save_cursor() - saves cursor position and character attributes. +*/ +static void vc_save_cursor (VCChardev *vc) +{ +QemuTextConsole *s = vc->console; + + vc->x_saved = s->x; + vc->y_saved = s->y; + vc->t_attrib_saved = vc->t_attrib; +} + +/** +* vc_restore_cursor() - restores cursor position and character +* attributes from saved state. +*/ +static void vc_restore_cursor (VCChardev *vc) +{ +QemuTextConsole *s = vc->console; + + s->x = vc->x_saved; + s->y = vc->y_saved; + vc->t_attrib = vc->t_attrib_saved; +} +static void vc_putchar (VCChardev *vc,int ch) {QemuTextConsole *s = vc->console;
@@ -699,6 +725,12 @@ static void vc_putchar(VCChardev *vc, int ch) vc->state =TTY_STATE_G0 ; }else if (ch ==')' ) { vc->state =TTY_STATE_G1 ; + }else if (ch =='7' ) { +vc_save_cursor (vc); + vc->state =TTY_STATE_NORM ; + }else if (ch =='8' ) { +vc_restore_cursor (vc); + vc->state =TTY_STATE_NORM ; }else { vc->state =TTY_STATE_NORM ; }
@@ -833,14 +865,10 @@ static void vc_putchar(VCChardev *vc, int ch) }break ;case 's' : -/* save cursor position */ - vc->x_saved = s->x; - vc->y_saved = s->y; +vc_save_cursor (vc);break ;case 'u' : -/* restore cursor position */ - s->x = vc->x_saved; - s->y = vc->y_saved; +vc_restore_cursor (vc);break ;default :trace_console_putchar_unhandled (ch);
Signature · 1 line
2.43.0
PATCH 5/5 ui/console-vc: implement DCH (delete) and ICH (insert) commands
In reply to Roman PenyaevThis patch implements DCH (delete character) and ICH (insert character) commands.
DCH - Delete Character:
"As characters are deleted, the remaining characters between the
cursor and right margin move to the left. Character attributes move with the characters. The terminal adds blank spaces with no visual character attributes at the right margin. DCH has no effect outside the scrolling margins" [1].
ICH - Insert Character:
"The ICH sequence inserts Pn blank characters with the normal
character attribute. The cursor remains at the beginning of the blank characters. Text between the cursor and right margin moves to the right. Characters scrolled past the right margin are lost. ICH has no effect outside the scrolling margins" [2].
Without these commands console is barely usable.
[1] https://vt100.net/docs/vt510-rm/DCH.html
[1] https://vt100.net/docs/vt510-rm/ICH.html
--- ui/console-vc.c | 108 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 102 insertions(+), 6 deletions(-)
ui/console-vc.c +102 -6
@@ -598,21 +598,29 @@ static void vc_clear_xy(VCChardev *vc, int x, int y)vc_update_xy (vc, x, y); } -static void vc_put_one (VCChardev *vc,int ch) +static void vc_insert_xy (VCChardev *vc,int ch,int x,int y) {QemuTextConsole *s = vc->console;TextCell *c;int y1; + + y1 = (s->y_base + y) % s->total_height; + c = &s->cells[y1 * s->width + x]; + c->ch = ch; + c->t_attrib = vc->t_attrib; +vc_update_xy (vc, x, y); +} + +static void vc_put_one (VCChardev *vc,int ch) +{ +QemuTextConsole *s = vc->console; +if (s->x >= s->width) {/* line wrap */ s->x =0 ;vc_put_lf (vc); } - y1 = (s->y_base + s->y) % s->total_height; - c = &s->cells[y1 * s->width + s->x]; - c->ch = ch; - c->t_attrib = vc->t_attrib; -vc_update_xy (vc, s->x, s->y); +vc_insert_xy (vc, ch, s->x, s->y); s->x++; }
@@ -645,6 +653,88 @@ static void vc_set_cursor(VCChardev *vc, int x, int y) s->y = y; } +/** +* vc_csi_P() - (DCH) deletes one or more characters from the cursor +* position to the right. As characters are deleted, the remaining +* characters between the cursor and right margin move to the +* left. Character attributes move with the characters. +*/ +static void vc_csi_P (struct VCChardev *vc,unsigned int nr) +{ +QemuTextConsole *s = vc->console; +TextCell *c1, *c2; +unsigned int x1, x2, y; +unsigned int end, len; + +if (!nr) { + nr =1 ; + } +if (nr > s->width - s->x) { + nr = s->width - s->x; +if (!nr) { +return ; + } + } + + x1 = s->x; + x2 = s->x + nr; + len = s->width - x2; +if (len) { + y = (s->y_base + s->y) % s->total_height; + c1 = &s->cells[y * s->width + x1]; + c2 = &s->cells[y * s->width + x2]; +memmove (c1, c2, len *sizeof (*c1)); +for (end = x1 + len; x1 < end; x1++) { +vc_update_xy (vc, x1, s->y); + } + } +/* Clear the rest */ +for (; x1 < s->width; x1++) { +vc_clear_xy (vc, x1, s->y); + } +} + +/** +* vc_csi_at() - (ICH) inserts `nr` blank characters with the normal +* character attribute. The cursor remains at the beginning of the +* blank characters. Text between the cursor and right margin moves to +* the right. Characters scrolled past the right margin are lost. +*/ +static void vc_csi_at (struct VCChardev *vc,unsigned int nr) +{ +QemuTextConsole *s = vc->console; +TextCell *c1, *c2; +unsigned int x1, x2, y; +unsigned int end, len; + +if (!nr) { + nr =1 ; + } +if (nr > s->width - s->x) { + nr = s->width - s->x; +if (!nr) { +return ; + } + } + + x1 = s->x + nr; + x2 = s->x; + len = s->width - x1; +if (len) { + y = (s->y_base + s->y) % s->total_height; + c1 = &s->cells[y * s->width + x1]; + c2 = &s->cells[y * s->width + x2]; +memmove (c1, c2, len *sizeof (*c1)); +for (end = x1 + len; x1 < end; x1++) { +vc_update_xy (vc, x1, s->y); + } + } +/* Insert spaces */ +for (x1 = s->x; x1 < s->x + nr; x1++) { +vc_insert_xy (vc,' ' , x1, s->y); + } +} +/** * vc_save_cursor() - saves cursor position and character attributes. */
@@ -847,6 +937,9 @@ static void vc_putchar(VCChardev *vc, int ch)break ; }break ; +case 'P' : +vc_csi_P (vc, vc->esc_params[0 ]); +break ;case 'm' :vc_handle_escape (vc);break ;
@@ -870,6 +963,9 @@ static void vc_putchar(VCChardev *vc, int ch)case 'u' :vc_restore_cursor (vc);break ; +case '@' : +vc_csi_at (vc, vc->esc_params[0 ]); +break ;default :trace_console_putchar_unhandled (ch);break ;
Signature · 1 line
2.43.0
Re: [PATCH 5/5] ui/console-vc: implement DCH (delete) and ICH (insert) commands
Hi
Quoted 108 lines · Roman Penyaev
This patch implements DCH (delete character) and ICH (insert character) commands.
DCH - Delete Character:
"As characters are deleted, the remaining characters between the
cursor and right margin move to the left. Character attributes move with the characters. The terminal adds blank spaces with no visual character attributes at the right margin. DCH has no effect outside the scrolling margins" [1].ICH - Insert Character:
"The ICH sequence inserts Pn blank characters with the normal
character attribute. The cursor remains at the beginning of the blank characters. Text between the cursor and right margin moves to the right. Characters scrolled past the right margin are lost. ICH has no effect outside the scrolling margins" [2].Without these commands console is barely usable.
[1] https://vt100.net/docs/vt510-rm/DCH.html
[1] https://vt100.net/docs/vt510-rm/ICH.htmlSigned-off-by Roman Penyaev <[email protected]>Cc "Marc-André Lureau" <[email protected]>--- ui/console-vc.c | 108 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 102 insertions(+), 6 deletions(-)ui/console-vc.c +48
-6@@ -598,21 +598,29 @@ static void vc_clear_xy(VCChardev *vc, int x, int y)vc_update_xy (vc, x, y); } -static void vc_put_one (VCChardev *vc,int ch) +static void vc_insert_xy (VCChardev *vc,int ch,int x,int y) {QemuTextConsole *s = vc->console;TextCell *c;int y1; + + y1 = (s->y_base + y) % s->total_height; + c = &s->cells[y1 * s->width + x]; + c->ch = ch; + c->t_attrib = vc->t_attrib; +vc_update_xy (vc, x, y); +} + +static void vc_put_one (VCChardev *vc,int ch) +{ +QemuTextConsole *s = vc->console; +if (s->x >= s->width) {/* line wrap */ s->x =0 ;vc_put_lf (vc); } - y1 = (s->y_base + s->y) % s->total_height; - c = &s->cells[y1 * s->width + s->x]; - c->ch = ch; - c->t_attrib = vc->t_attrib; -vc_update_xy (vc, s->x, s->y); +vc_insert_xy (vc, ch, s->x, s->y); s->x++; }@@ -645,6 +653,88 @@ static void vc_set_cursor(VCChardev *vc, int x, int y) s->y = y; } +/** +* vc_csi_P() - (DCH) deletes one or more characters from the cursor +* position to the right. As characters are deleted, the remaining +* characters between the cursor and right margin move to the +* left. Character attributes move with the characters. +*/ +static void vc_csi_P (struct VCChardev *vc,unsigned int nr) +{ +QemuTextConsole *s = vc->console; +TextCell *c1, *c2; +unsigned int x1, x2, y; +unsigned int end, len; + +if (!nr) { + nr =1 ; + } +if (nr > s->width - s->x) { + nr = s->width - s->x; +if (!nr) { +return ; + } + } + + x1 = s->x; + x2 = s->x + nr; + len = s->width - x2; +if (len) { + y = (s->y_base + s->y) % s->total_height; + c1 = &s->cells[y * s->width + x1]; + c2 = &s->cells[y * s->width + x2]; +memmove (c1, c2, len *sizeof (*c1)); +for (end = x1 + len; x1 < end; x1++) { +vc_update_xy (vc, x1, s->y); + }
ui/console-vc.c static void vc_set_cursor(VCChardev *vc, int x, int y) · line 699
Quoted 10 lines
ui/console-vc.c +10
-0+ } +/* Clear the rest */ +for (; x1 < s->width; x1++) { +vc_clear_xy (vc, x1, s->y); + } +} + +/** +* vc_csi_at() - (ICH) inserts `nr` blank characters with the normal +* character attribute. The cursor remains at the beginning of the
What is "normal character attribute"?
Should you set it to TEXT_ATTRIBUTES_DEFAULT while inserting blank chars?
Quoted 65 lines
ui/console-vc.c +44
-1+* blank characters. Text between the cursor and right margin moves to +* the right. Characters scrolled past the right margin are lost. +*/ +static void vc_csi_at (struct VCChardev *vc,unsigned int nr) +{ +QemuTextConsole *s = vc->console; +TextCell *c1, *c2; +unsigned int x1, x2, y; +unsigned int end, len; + +if (!nr) { + nr =1 ; + } +if (nr > s->width - s->x) { + nr = s->width - s->x; +if (!nr) { +return ; + } + } + + x1 = s->x + nr; + x2 = s->x; + len = s->width - x1; +if (len) { + y = (s->y_base + s->y) % s->total_height; + c1 = &s->cells[y * s->width + x1]; + c2 = &s->cells[y * s->width + x2]; +memmove (c1, c2, len *sizeof (*c1)); +for (end = x1 + len; x1 < end; x1++) { +vc_update_xy (vc, x1, s->y); + } + } +/* Insert spaces */ +for (x1 = s->x; x1 < s->x + nr; x1++) { +vc_insert_xy (vc,' ' , x1, s->y); + } +} +/** * vc_save_cursor() - saves cursor position and character attributes. */ @@ -847,6 +937,9 @@ static void vc_putchar(VCChardev *vc, int ch)break ; }break ; +case 'P' : +vc_csi_P (vc, vc->esc_params[0 ]); +break ;case 'm' :vc_handle_escape (vc);break ;@@ -870,6 +963,9 @@ static void vc_putchar(VCChardev *vc, int ch)case 'u' :vc_restore_cursor (vc);break ; +case '@' : +vc_csi_at (vc, vc->esc_params[0 ]); +break ;default :trace_console_putchar_unhandled (ch);break ; --2.43.0
Signature · 1 line
Marc-André Lureau
Re: [PATCH 5/5] ui/console-vc: implement DCH (delete) and ICH (insert) commands
Quoted 125 lines · Marc-André Lureau
Hi
Quoted 108 lines · Roman Penyaev
This patch implements DCH (delete character) and ICH (insert character) commands.
DCH - Delete Character:
"As characters are deleted, the remaining characters between the
cursor and right margin move to the left. Character attributes move with the characters. The terminal adds blank spaces with no visual character attributes at the right margin. DCH has no effect outside the scrolling margins" [1].ICH - Insert Character:
"The ICH sequence inserts Pn blank characters with the normal
character attribute. The cursor remains at the beginning of the blank characters. Text between the cursor and right margin moves to the right. Characters scrolled past the right margin are lost. ICH has no effect outside the scrolling margins" [2].Without these commands console is barely usable.
[1] https://vt100.net/docs/vt510-rm/DCH.html
[1] https://vt100.net/docs/vt510-rm/ICH.htmlSigned-off-by Roman Penyaev <[email protected]>Cc "Marc-André Lureau" <[email protected]>--- ui/console-vc.c | 108 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 102 insertions(+), 6 deletions(-)ui/console-vc.c +48
-6@@ -598,21 +598,29 @@ static void vc_clear_xy(VCChardev *vc, int x, int y)vc_update_xy (vc, x, y); } -static void vc_put_one (VCChardev *vc,int ch) +static void vc_insert_xy (VCChardev *vc,int ch,int x,int y) {QemuTextConsole *s = vc->console;TextCell *c;int y1; + + y1 = (s->y_base + y) % s->total_height; + c = &s->cells[y1 * s->width + x]; + c->ch = ch; + c->t_attrib = vc->t_attrib; +vc_update_xy (vc, x, y); +} + +static void vc_put_one (VCChardev *vc,int ch) +{ +QemuTextConsole *s = vc->console; +if (s->x >= s->width) {/* line wrap */ s->x =0 ;vc_put_lf (vc); } - y1 = (s->y_base + s->y) % s->total_height; - c = &s->cells[y1 * s->width + s->x]; - c->ch = ch; - c->t_attrib = vc->t_attrib; -vc_update_xy (vc, s->x, s->y); +vc_insert_xy (vc, ch, s->x, s->y); s->x++; }@@ -645,6 +653,88 @@ static void vc_set_cursor(VCChardev *vc, int x, int y) s->y = y; } +/** +* vc_csi_P() - (DCH) deletes one or more characters from the cursor +* position to the right. As characters are deleted, the remaining +* characters between the cursor and right margin move to the +* left. Character attributes move with the characters. +*/ +static void vc_csi_P (struct VCChardev *vc,unsigned int nr) +{ +QemuTextConsole *s = vc->console; +TextCell *c1, *c2; +unsigned int x1, x2, y; +unsigned int end, len; + +if (!nr) { + nr =1 ; + } +if (nr > s->width - s->x) { + nr = s->width - s->x; +if (!nr) { +return ; + } + } + + x1 = s->x; + x2 = s->x + nr; + len = s->width - x2; +if (len) { + y = (s->y_base + s->y) % s->total_height; + c1 = &s->cells[y * s->width + x1]; + c2 = &s->cells[y * s->width + x2]; +memmove (c1, c2, len *sizeof (*c1)); +for (end = x1 + len; x1 < end; x1++) { +vc_update_xy (vc, x1, s->y); + }ui/console-vc.c static void vc_set_cursor(VCChardev *vc, int x, int y) · line 699
Quoted 10 lines
ui/console-vc.c +10
-0+ } +/* Clear the rest */ +for (; x1 < s->width; x1++) { +vc_clear_xy (vc, x1, s->y); + } +} + +/** +* vc_csi_at() - (ICH) inserts `nr` blank characters with the normal +* character attribute. The cursor remains at the beginning of the What is "normal character attribute"?
Quoted 1 line
Should you set it to
TEXT_ATTRIBUTES_DEFAULTwhile inserting blank chars?
Hi,
The wording "default attributes" is more precise, I like it. The original VT spec
and ECMA-48 are rather vague about exactly what attributes should be set for "erased state", but various terminal implementations (including vt.c from the Linux kernel) simply reset the character to the default state. From the perspective of the existing console-vc.c API, a more correct call is vt_clear_xt(),
which clears attributes to default rather than inserting a "space" with vt_put_xy().
I'll fix that. Thanks.
--
Roman