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 @@ -568,7 +568,8 @@ REPLServer.prototype.displayPrompt = function(preserveCursor) {
568
568
var prompt = this . _initialPrompt ;
569
569
if ( this . bufferedCommand . length ) {
570
570
prompt = '...' ;
571
- var levelInd = new Array ( this . lines . level . length ) . join ( '..' ) ;
571
+ const len = this . lines . level . length ? this . lines . level . length - 1 : 0 ;
572
+ const levelInd = '..' . repeat ( len ) ;
572
573
prompt += levelInd + ' ' ;
573
574
}
574
575
@@ -920,7 +921,8 @@ REPLServer.prototype.memory = function memory(cmd) {
920
921
// save the line so I can do magic later
921
922
if ( cmd ) {
922
923
// TODO should I tab the level?
923
- self . lines . push ( new Array ( self . lines . level . length ) . join ( ' ' ) + cmd ) ;
924
+ const len = self . lines . level . length ? self . lines . level . length - 1 : 0 ;
925
+ self . lines . push ( ' ' . repeat ( len ) + cmd ) ;
924
926
} else {
925
927
// I don't want to not change the format too much...
926
928
self . lines . push ( '' ) ;
You can’t perform that action at this time.
0 commit comments