File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -554,7 +554,8 @@ REPLServer.prototype.displayPrompt = function(preserveCursor) {
554
554
var prompt = this . _initialPrompt ;
555
555
if ( this . bufferedCommand . length ) {
556
556
prompt = '...' ;
557
- var levelInd = new Array ( this . lines . level . length ) . join ( '..' ) ;
557
+ const len = this . lines . level . length ? this . lines . level . length - 1 : 0 ;
558
+ const levelInd = '..' . repeat ( len ) ;
558
559
prompt += levelInd + ' ' ;
559
560
}
560
561
@@ -906,7 +907,8 @@ REPLServer.prototype.memory = function memory(cmd) {
906
907
// save the line so I can do magic later
907
908
if ( cmd ) {
908
909
// TODO should I tab the level?
909
- self . lines . push ( new Array ( self . lines . level . length ) . join ( ' ' ) + cmd ) ;
910
+ const len = self . lines . level . length ? self . lines . level . length - 1 : 0 ;
911
+ self . lines . push ( ' ' . repeat ( len ) + cmd ) ;
910
912
} else {
911
913
// I don't want to not change the format too much...
912
914
self . lines . push ( '' ) ;
You can’t perform that action at this time.
0 commit comments