tAlways restore terminal mode in TUI cleanup - sacc - sacc(omys), simple console gopher client (mirror) HTML git clone https://git.parazyd.org/sacc DIR Log DIR Files DIR Refs DIR LICENSE --- DIR commit eae2a995544b2b48c3a7debcb186a00aa0c400b3 DIR parent 6582965f7a534eb82339208980582fcb661fe7c3 HTML Author: Quentin Rameau <quinq@fifth.space> Date: Mon, 22 Mar 2021 18:44:01 +0100 Always restore terminal mode in TUI cleanup Thanks to Hiltjo for spotting that Diffstat: M ui_ti.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- DIR diff --git a/ui_ti.c b/ui_ti.c t@@ -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); }