When resetting the terminal, also reset parser state, this allows easy recovery from incomplete escape codes

Fixes #1961
This commit is contained in:
Kovid Goyal 2019-09-09 20:06:44 +05:30
parent 17fd749e8d
commit e4ba5f449f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
color for the global padding, instead of the configured background color
(:iss:`1957`)
- When resetting the terminal, also reset parser state, this allows easy
recovery from incomplete escape codes (:iss:`1961`)
0.14.4 [2019-08-31]
---------------------

View File

@ -153,6 +153,10 @@ screen_reset(Screen *self) {
set_dynamic_color(self, 110, NULL);
set_dynamic_color(self, 111, NULL);
set_color_table_color(self, 104, NULL);
self->parser_state = 0;
self->parser_text_start = 0;
self->parser_buf_pos = 0;
self->parser_has_pending_text = false;
}
void