From 94e78b32499c71db1e32262e4edbfc3ebc4b120b Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 25 Jan 2019 09:10:37 -0400 Subject: Make use of xterm alternate screen ..so that your scrollback isn't messed up by mtui's output when you quit. --- index.js | 2 ++ tui-lib | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index c366ed7..e46bfa0 100755 --- a/index.js +++ b/index.js @@ -44,6 +44,7 @@ async function main() { appElement.on('quitRequested', () => { process.stdout.write(ansi.cleanCursor()) + process.stdout.write(ansi.disableAlternateScreen()) process.exit(0) }) @@ -67,6 +68,7 @@ async function main() { root.h = size.height root.fixAllLayout() + process.stdout.write(ansi.enableAlternateScreen()) process.stdout.write(ansi.startTrackingMouse()) const flushable = new Flushable(process.stdout, true) diff --git a/tui-lib b/tui-lib index 0c38fb4..6ca4f2e 160000 --- a/tui-lib +++ b/tui-lib @@ -1 +1 @@ -Subproject commit 0c38fb468621b3860fc9c7deb12ae464c57996e8 +Subproject commit 6ca4f2e08d323b26940704eca89bdc71b4ed0160 -- cgit 1.3.0-6-gf8a5