Skip to content

Commit 075ea64

Browse files
[Console] minor fix
1 parent 0a6f821 commit 075ea64

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Helper/QuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
309309
$remainingCharacters = substr($ret, \strlen(trim($this->mostRecentlyEnteredValue($fullChoice))));
310310
$output->write($remainingCharacters);
311311
$fullChoice .= $remainingCharacters;
312-
$i = self::strlen($fullChoice);
312+
$i = (false === $encoding = mb_detect_encoding($fullChoice, null, true)) ? \strlen($fullChoice) : mb_strlen($fullChoice, $encoding);
313313

314314
$matches = array_filter(
315315
$autocomplete($ret),

Style/SymfonyStyle.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,6 @@ private function createBlock(iterable $messages, string $type = null, string $st
496496
}
497497

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

503501
if ($style) {

0 commit comments

Comments
 (0)