From b087c428ba492715626a7875185f9ba18fb30b3e Mon Sep 17 00:00:00 2001 From: liam4 Date: Mon, 3 Jul 2017 21:13:50 -0300 Subject: Improve cursor display - Whether the cursor is displayed or not is now based on the cursorVisible property rather than whether cursorX and cursorY are set or not. - The actual shell cursor is now invisible... this is objectively an act of Evil, though! This doesn't look like too hard to fix, thankfully. - A new cleanCursor function has been added to ansi.js. --- util/ansi.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util/ansi.js') diff --git a/util/ansi.js b/util/ansi.js index 0e6e3fe..0ee1bc1 100644 --- a/util/ansi.js +++ b/util/ansi.js @@ -43,6 +43,12 @@ const ansi = { return `${ESC}[${line + 1};${col + 1}H` }, + cleanCursor() { + // A combination of codes that generally cleans up the cursor. + + return ansi.resetAttributes() + ansi.showCursor() + }, + hideCursor() { // Makes the cursor invisible. -- cgit 1.3.0-6-gf8a5