diff --git a/repos/gems/src/server/terminal/main.cc b/repos/gems/src/server/terminal/main.cc index 1df537c9de..5a62f8e56a 100644 --- a/repos/gems/src/server/terminal/main.cc +++ b/repos/gems/src/server/terminal/main.cc @@ -116,7 +116,17 @@ struct Terminal::Main : Character_consumer void _handle_mode_change() { + Rect const orig_win_rect = _win_rect; + _win_rect = _gui_window_rect(); + + /* shrink view before shrinking the buffer to prevent tiling artifacts */ + Rect const intersection = Rect::intersect(orig_win_rect, _win_rect); + if (intersection != orig_win_rect) { + _gui.enqueue(_view, intersection); + _gui.execute(); + } + _handle_config(); }