Skip to content

Commit a4f20ea

Browse files
committed
fix: failing rendering in mid line insertions
Signed-off-by: Snehil Shah <snehilshah.989@gmail.com>
1 parent 27aaf8f commit a4f20ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/node_modules/@stdlib/repl/lib/multiline_handler.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,7 @@ setNonEnumerableReadOnly( MultilineHandler.prototype, 'processLine', function pr
362362
readline.cursorTo( this._ostream, 0 );
363363
this._rli.line = this._remainingLine;
364364

365-
// Re-render remaining lines and clear buffer:
366-
this._renderLines();
365+
// Clear buffer:
367366
this._remainingLine = '';
368367
this._multiline.mode = 'incomplete_expression'; // reset flag
369368
return;
@@ -492,7 +491,8 @@ setNonEnumerableReadOnly( MultilineHandler.prototype, 'onKeypress', function onK
492491

493492
// Simulate `line` event:
494493
this._rli.write( '\n' );
495-
} else if ( this._multiline.active ) {
494+
}
495+
if ( this._multiline.active ) {
496496
// Render remaining lines with each keypress when in multiline mode:
497497
this._renderLines();
498498
}

0 commit comments

Comments
 (0)