diff options
author | Florrie <towerofnix@gmail.com> | 2018-06-02 23:28:01 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-06-02 23:28:01 -0300 |
commit | 3386ff9428997fdcebab1f67cb83c82e4636be89 (patch) | |
tree | 52447d24325e52a592829c1f8b4475b1eaa03ca7 /util/Flushable.js | |
parent | 23dc4b24d92eb2e19c55029522acabfccb701915 (diff) |
CommandLineInterfacer/Flushable resize support
Diffstat (limited to 'util/Flushable.js')
-rw-r--r-- | util/Flushable.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/util/Flushable.js b/util/Flushable.js index 6546b7a..318bb52 100644 --- a/util/Flushable.js +++ b/util/Flushable.js @@ -16,9 +16,10 @@ module.exports = class Flushable { // and ANSI-interpreted compressed size) in the output of flush. this.shouldShowCompressionStatistics = false - // Update these if you plan on using the ANSI compressor! + // Use resizeScreen if you plan on using the ANSI compressor! this.screenLines = 24 this.screenCols = 80 + this.lastFrame = undefined this.ended = false this.paused = false @@ -27,6 +28,12 @@ module.exports = class Flushable { this.chunks = [] } + resizeScreen({lines, cols}) { + this.screenLines = lines + this.screenCols = cols + this.lastFrame = undefined + } + write(what) { this.chunks.push(what) } |