Stub for DCS codes

This commit is contained in:
Kovid Goyal 2016-11-18 11:31:48 +05:30
parent 4ac03a0064
commit a120b25286
2 changed files with 11 additions and 1 deletions

View File

@ -486,7 +486,11 @@ HANDLER(osc) {
// Parse DCS {{{
HANDLER(dcs) {
screen->parser_state = NORMAL_STATE;
// http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Device-Control-functions
uint8_t ch = buf[(*pos)++];
if (ch == ST) {
SET_STATE(NORMAL_STATE);
}
}
// }}}

View File

@ -146,3 +146,9 @@ def test_osc_codes(self):
c.clear()
pb('\033]2;;;;\x07', ('set_title', 3))
self.ae(c.titlebuf, b';;;')
def test_dcs_codes(self):
s = self.create_screen()
pb = partial(self.parse_bytes_dump, s)
pb(b'a\033P2;xyz\x9cbcde')
self.ae(str(s.line(0)), 'abcde')