aboutsummaryrefslogtreecommitdiff
path: root/bb.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-05-31 12:59:36 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-05-31 12:59:36 -0700
commitf019a8b0f57d1ceced6be345d1d0135c91822da9 (patch)
tree8064a928cfe56e203ed79d9dc73b6aa3e2540a0b /bb.c
parentc7ce37ffbf1950ba199ec56fd6910657c0b6a760 (diff)
Fixed some stuff with alt screen and spurious output to stdout
Diffstat (limited to 'bb.c')
-rw-r--r--bb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/bb.c b/bb.c
index 2389482..ccde76f 100644
--- a/bb.c
+++ b/bb.c
@@ -223,10 +223,6 @@ void close_term(void)
tty_out = NULL;
fclose(tty_in);
tty_in = NULL;
- } else {
- fputs(T_LEAVE_BBMODE_PARTIAL, stdout);
- fputs(T_ON(T_WRAP), stdout);
- fflush(stdout);
}
signal(SIGWINCH, SIG_DFL);
}
@@ -255,9 +251,9 @@ void cleanup(void)
free(cmdfilename);
cmdfilename = NULL;
}
+ if (tty_out)
+ fputs(T_OFF(T_ALT_SCREEN), tty_out);
close_term();
- fputs(T_OFF(T_ALT_SCREEN), stdout);
- fflush(stdout);
}
/*