« get me outta code hell

tui-lib - Pure Node.js library for making visual command-line programs (ala vim, ncdu)
about summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/ansi.js6
1 files changed, 6 insertions, 0 deletions
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.