commit eae2a995544b2b48c3a7debcb186a00aa0c400b3 Quentin Rameau <quinq@fifth.space> 2021-03-22 18:44:01 +0100 Always restore terminal mode in TUI cleanup Thanks to Hiltjo for spotting that
ui_ti.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui_ti.c b/ui_ti.c index 93827fb..2c3395a 100644 --- a/ui_ti.c +++ b/ui_ti.c @@ -50,12 +50,13 @@ uisetup(void) void uicleanup(void) { + tcsetattr(0, TCSANOW, &tsave); + if (termset != OK) return; putp(tparm(change_scroll_region, 0, lines-1, 0, 0, 0, 0, 0, 0, 0)); putp(tparm(clear_screen, 0, 0, 0, 0, 0, 0, 0, 0, 0)); - tcsetattr(0, TCSANOW, &tsave); fflush(stdout); }