summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-06-30 09:08:44 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-06-30 09:08:44 +0100
commiteb4ac85fb195b119ff86cf5c2b9741bb7fdd2d37 (patch)
treee5c2373a85c400c66b928129da49c44e87a66d3d
parent130b22ff74d33c94c5055031ffbe34401fea2ac1 (diff)
Force setting of terminal hardware scroll region on resize
It seems there is a race condition with VTE based terminals when created and resized almost immediatly (like when doing :new) where we end up with the hardware scroll region set to the old terminal size.
-rw-r--r--src/ncurses_ui.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc
index a2364fd3..d7c74940 100644
--- a/src/ncurses_ui.cc
+++ b/src/ncurses_ui.cc
@@ -444,6 +444,9 @@ void NCursesUI::check_resize(bool force)
m_window = (NCursesWin*)newwin(ws.ws_row, ws.ws_col, 0, 0);
m_dimensions = CharCoord{ws.ws_row-1, ws.ws_col};
+
+ if (const char* csr = tigetstr((char*)"csr"))
+ putp(tiparm(csr, 0, ws.ws_row));
}
else
kak_assert(false);