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 ++ 1 file changed, 2 insertions(+) (limited to 'index.js') 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) -- cgit 1.3.0-6-gf8a5