Clear the alt screen graphics buffer when switching away from it as well as to it
This commit is contained in:
parent
747f7b076d
commit
b4b6968e07
@ -434,9 +434,9 @@ screen_handle_graphics_command(Screen *self, const GraphicsCommand *cmd, const u
|
|||||||
void
|
void
|
||||||
screen_toggle_screen_buffer(Screen *self) {
|
screen_toggle_screen_buffer(Screen *self) {
|
||||||
bool to_alt = self->linebuf == self->main_linebuf;
|
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) {
|
if (to_alt) {
|
||||||
linebuf_clear(self->alt_linebuf, BLANK_CHAR);
|
linebuf_clear(self->alt_linebuf, BLANK_CHAR);
|
||||||
grman_clear(self->alt_grman);
|
|
||||||
screen_save_cursor(self);
|
screen_save_cursor(self);
|
||||||
self->linebuf = self->alt_linebuf;
|
self->linebuf = self->alt_linebuf;
|
||||||
self->tabstops = self->alt_tabstops;
|
self->tabstops = self->alt_tabstops;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user