vt: fix SS2/SS3 escape sequences to act correctly as single shifts

These sequences are supposed to affect the next printable ASCII
character and then reset to the previous character set, but before
this commit they were behaving like locking shifts.
This commit is contained in:
Craig Barnes 2021-06-08 21:09:40 +01:00
parent e72e8b1b8e
commit a2c9c56f19
4 changed files with 22 additions and 4 deletions

6
vt.c
View file

@ -426,14 +426,12 @@ action_esc_dispatch(struct terminal *term, uint8_t final)
case 'N':
/* SS2 - Single Shift 2 */
term->charsets.selected = 2; /* G2 */
term_update_ascii_printer(term);
term_set_single_shift_ascii_printer(term, 2); /* G2 */
break;
case 'O':
/* SS3 - Single Shift 3 */
term->charsets.selected = 3; /* G3 */
term_update_ascii_printer(term);
term_set_single_shift_ascii_printer(term, 3); /* G3 */
break;
case '\\':