diff options
-rw-r--r-- | util/ansi.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/ansi.js b/util/ansi.js index f0d7bf7..f976c12 100644 --- a/util/ansi.js +++ b/util/ansi.js @@ -113,6 +113,12 @@ const ansi = { return `${ESC}[6n` }, + measureColumns(text) { + // Returns the number of columns the given text takes. + + return wcwidth(text) + }, + isANSICommand(buffer, code = null) { return ( buffer[0] === 0x1b && buffer[1] === 0x5b && |