Skip to content

Commit

Permalink
Cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
freost committed Nov 3, 2024
1 parent 4cb47f8 commit 4d202fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/mako/cli/output/Cursor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -211,14 +211,14 @@ public function clearLines(int $lines): void
*/
public function clearScreen(): void
{
$this->output->write("\e[H\e[2J");
$this->output->write("\033[H\033[2J");
}

/**
* Clears the screen from the cursor.
*/
public function clearScreenFromCursor(): void
{
$this->output->write("\e[J");
$this->output->write("\033[J");
}
}
2 changes: 1 addition & 1 deletion tests/unit/cli/output/OutputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4d202fe

Please sign in to comment.