diff --git a/src/mako/cli/output/Cursor.php b/src/mako/cli/output/Cursor.php index af3fb39f7..c8b75f7f8 100644 --- a/src/mako/cli/output/Cursor.php +++ b/src/mako/cli/output/Cursor.php @@ -51,7 +51,7 @@ public function isHidden(): bool */ public function hide(): void { - $this->output->write("\e[?25l"); + $this->output->write("\033[?25l"); $this->hidden = true; } @@ -61,7 +61,7 @@ public function hide(): void */ public function show(): void { - $this->output->write("\e[?25h"); + $this->output->write("\033[?25h"); $this->hidden = false; } @@ -211,7 +211,7 @@ public function clearLines(int $lines): void */ public function clearScreen(): void { - $this->output->write("\e[H\e[2J"); + $this->output->write("\033[H\033[2J"); } /** @@ -219,6 +219,6 @@ public function clearScreen(): void */ public function clearScreenFromCursor(): void { - $this->output->write("\e[J"); + $this->output->write("\033[J"); } } diff --git a/tests/unit/cli/output/OutputTest.php b/tests/unit/cli/output/OutputTest.php index a3a0e8543..a9d6a7cbe 100644 --- a/tests/unit/cli/output/OutputTest.php +++ b/tests/unit/cli/output/OutputTest.php @@ -170,7 +170,7 @@ public function testClearWithAnsiSupport(): void $std = $this->getWriter(); $err = $this->getWriter(); - $std->shouldReceive('write')->once()->with("\e[H\e[2J"); + $std->shouldReceive('write')->once()->with("\033[H\033[2J"); /** @var \mako\cli\Environment|\Mockery\MockInterface $env */ $env = Mockery::mock(Environment::class);