diff --git a/docs/changelog.rst b/docs/changelog.rst index d2a1564c4..ed8d5861e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -14,6 +14,9 @@ To update |kitty|, :doc:`follow the instructions `. 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] --------------------- diff --git a/kitty/screen.c b/kitty/screen.c index 7a888973c..8d70745d0 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -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