Skip to content

Commit b7b8b4f

Browse files
committed
Remove redundant comments
1 parent 4c441b0 commit b7b8b4f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Symfony/Component/Console/Helper/QuestionHelper.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ protected function writeError(OutputInterface $output, \Exception $error)
236236
*/
237237
private function autocomplete(OutputInterface $output, Question $question, $inputStream, callable $autocomplete): string
238238
{
239-
$cursor = new Cursor($output);
239+
$cursor = new Cursor($output, $inputStream);
240240

241241
$fullChoice = '';
242242
$ret = '';
@@ -265,7 +265,6 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
265265
} elseif ("\177" === $c) { // Backspace Character
266266
if (0 === $numMatches && 0 !== $i) {
267267
--$i;
268-
// Move cursor backwards
269268
$cursor->moveLeft();
270269

271270
$fullChoice = self::substr($fullChoice, 0, $i);
@@ -354,16 +353,13 @@ function ($match) use ($ret) {
354353
}
355354
}
356355

357-
// Erase characters from cursor to end of line
358356
$cursor->clearLine(true);
359357

360358
if ($numMatches > 0 && -1 !== $ofs) {
361-
// Save cursor position
362359
$cursor->savePosition();
363360
// Write highlighted text, complete the partially entered response
364361
$charactersEntered = \strlen(trim($this->mostRecentlyEnteredValue($fullChoice)));
365362
$output->write('<hl>'.OutputFormatter::escapeTrailingBackslash(substr($matches[$ofs], $charactersEntered)).'</hl>');
366-
// Restore cursor position
367363
$cursor->restorePosition();
368364
}
369365
}

0 commit comments

Comments
 (0)