Skip to content

Commit

Permalink
[Console] minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Mar 23, 2021
1 parent 0a6f821 commit 075ea64
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion Helper/QuestionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
$remainingCharacters = substr($ret, \strlen(trim($this->mostRecentlyEnteredValue($fullChoice))));
$output->write($remainingCharacters);
$fullChoice .= $remainingCharacters;
$i = self::strlen($fullChoice);
$i = (false === $encoding = mb_detect_encoding($fullChoice, null, true)) ? \strlen($fullChoice) : mb_strlen($fullChoice, $encoding);

$matches = array_filter(
$autocomplete($ret),
Expand Down
2 changes: 0 additions & 2 deletions Style/SymfonyStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,6 @@ private function createBlock(iterable $messages, string $type = null, string $st
}

$line = $prefix.$line;
$decorationLength = Helper::strlen($line) - Helper::strlenWithoutDecoration($this->getFormatter(), $line);
$messageLineLength = min($this->lineLength - $prefixLength - $indentLength + $decorationLength, $this->lineLength);
$line .= str_repeat(' ', max($this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line), 0));

if ($style) {
Expand Down

0 comments on commit 075ea64

Please sign in to comment.