File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -381,20 +381,17 @@ private function overwrite(string $message): void
381381 $ lines = floor (Helper::strlen ($ message ) / $ this ->terminal ->getWidth ()) + $ this ->formatLineCount + 1 ;
382382 $ this ->output ->clear ($ lines );
383383 } else {
384- // Move the cursor to the beginning of the line
385- $ this ->output ->write ("\x0D" );
386-
387- // Erase the line
388- $ this ->output ->write ("\x1B[2K " );
389-
390384 // Erase previous lines
391385 if ($ this ->formatLineCount > 0 ) {
392- $ this -> output -> write ( str_repeat ("\x1B[1A \x1B[2K " , $ this ->formatLineCount )) ;
386+ $ message = str_repeat ("\x1B[1A \x1B[2K " , $ this ->formatLineCount ). $ message ;
393387 }
388+
389+ // Move the cursor to the beginning of the line and erase the line
390+ $ message = "\x0D\x1B[2K $ message " ;
394391 }
395392 }
396393 } elseif ($ this ->step > 0 ) {
397- $ this -> output -> writeln ( '' ) ;
394+ $ message = PHP_EOL . $ message ;
398395 }
399396
400397 $ this ->firstRun = false ;
You can’t perform that action at this time.
0 commit comments