zames_pro 2.15.1 → 2.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/input.js +5 -2
- package/package.json +1 -1
package/dist/input.js
CHANGED
|
@@ -377,8 +377,10 @@ export class LineEditor {
|
|
|
377
377
|
_eraseBlock() {
|
|
378
378
|
if (!this.rendered)
|
|
379
379
|
return;
|
|
380
|
-
|
|
381
|
-
|
|
380
|
+
const rows = process.stdout.rows || 24;
|
|
381
|
+
const up = Math.min(this.cursorRowFromTop, Math.max(0, rows - 1));
|
|
382
|
+
if (up > 0) {
|
|
383
|
+
process.stdout.write(ESC + '[' + up + 'A');
|
|
382
384
|
}
|
|
383
385
|
process.stdout.write(CR + ESC + '[J');
|
|
384
386
|
this.rendered = false;
|
|
@@ -432,6 +434,7 @@ export class LineEditor {
|
|
|
432
434
|
}
|
|
433
435
|
// Print a block ABOVE the input line and put the input line back.
|
|
434
436
|
printAbove(text) {
|
|
437
|
+
this._stopDots();
|
|
435
438
|
this._eraseBlock();
|
|
436
439
|
process.stdout.write(String(text) + NL);
|
|
437
440
|
this._writeBlock();
|