Implement DECALGN (fill screen with E's)

This commit is contained in:
Michael Jumper 2013-05-21 23:38:35 -07:00
parent dd936b4873
commit 266f4e8d1b
2 changed files with 32 additions and 0 deletions

View File

@ -45,6 +45,7 @@ int guac_terminal_escape(guac_terminal* term, char c);
int guac_terminal_charset(guac_terminal* term, char c);
int guac_terminal_csi(guac_terminal* term, char c);
int guac_terminal_osc(guac_terminal* term, char c);
int guac_terminal_ctrl_func(guac_terminal* term, char c);
#endif

View File

@ -184,6 +184,10 @@ int guac_terminal_escape(guac_terminal* term, char c) {
term->char_handler = guac_terminal_csi;
break;
case '#':
term->char_handler = guac_terminal_ctrl_func;
break;
/* Save Cursor (DECSC) */
case '7':
term->saved_cursor_row = term->cursor_row;
@ -672,3 +676,30 @@ int guac_terminal_osc(guac_terminal* term, char c) {
return 0;
}
int guac_terminal_ctrl_func(guac_terminal* term, char c) {
int row;
/* Build character with current attributes */
guac_terminal_char guac_char;
guac_char.value = 'E';
guac_char.attributes = term->current_attributes;
switch (c) {
/* Alignment test (fill screen with E's) */
case '8':
for (row=0; row<term->term_height; row++)
guac_terminal_set_columns(term, row, 0, term->term_width-1, &guac_char);
break;
}
term->char_handler = guac_terminal_echo;
return 0;
}