commit ccbddab53f0575c73101479891b6b5a49f3babc2
parent 81981a9cfdc7d0ef8af7886346b884ef68eaebba
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 4 Jul 2020 13:44:22 +0200
use application mode (smcup and rmcup)
Indicates the application mode, so on redraw the scrolling indicator can be
adjusted correctly.
Tested on mlterm and HaikuOS term, works fine now.
Diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -346,6 +346,13 @@ updatetitle(void)
}
void
+appmode(int on)
+{
+ /*fputs(on ? "\x1b[?1049h" : "\x1b[?1049l", stdout);*/ /* smcup, rmcup */
+ putp(tparm(on ? enter_ca_mode : exit_ca_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+}
+
+void
mousemode(int on)
{
fputs(on ? "\x1b[?1000h" : "\x1b[?1000l", stdout); /* xterm mouse mode */
@@ -421,6 +428,7 @@ cleanup(void)
/* restore terminal settings */
tcsetattr(0, TCSANOW, &tsave);
+ appmode(0);
cursormode(1);
clearscreen();
@@ -476,13 +484,13 @@ init(void)
resizewin();
cursormode(0);
+ appmode(1);
/* xterm mouse-mode */
if (usemouse)
mousemode(usemouse);
updategeom();
-
fflush(stdout);
sigemptyset(&sa.sa_mask);