From b4b6968e0722e45c1daceb8a8ebe452e66c065ed Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 8 Oct 2017 23:14:56 +0530 Subject: [PATCH] Clear the alt screen graphics buffer when switching away from it as well as to it --- kitty/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/screen.c b/kitty/screen.c index 75623894b..d808b974c 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -434,9 +434,9 @@ screen_handle_graphics_command(Screen *self, const GraphicsCommand *cmd, const u void screen_toggle_screen_buffer(Screen *self) { bool to_alt = self->linebuf == self->main_linebuf; + grman_clear(self->alt_grman); // always clear the alt buffer graphics to free up resources, since it has to be cleared when switching back to it anyway if (to_alt) { linebuf_clear(self->alt_linebuf, BLANK_CHAR); - grman_clear(self->alt_grman); screen_save_cursor(self); self->linebuf = self->alt_linebuf; self->tabstops = self->alt_tabstops;