vt: add support for LS2 and LS3 locking shifts

This commit is contained in:
Craig Barnes 2021-06-08 21:06:18 +01:00
parent e77b7d7111
commit e72e8b1b8e
2 changed files with 13 additions and 0 deletions

View file

@ -61,6 +61,7 @@
_Private Usage Area_ codepoints to be treated as double-width
characters.
* OSC 9 desktop notifications (iTerm2 compatible).
* Support for LS2 and LS3 (locking shift) escape sequences.
### Changed

12
vt.c
View file

@ -388,6 +388,18 @@ action_esc_dispatch(struct terminal *term, uint8_t final)
term_reset(term, true);
break;
case 'n':
/* LS2 - Locking Shift 2 */
term->charsets.selected = 2; /* G2 */
term_update_ascii_printer(term);
break;
case 'o':
/* LS3 - Locking Shift 3 */
term->charsets.selected = 3; /* G3 */
term_update_ascii_printer(term);
break;
case 'D':
term_linefeed(term);
break;