Skip to content

Commit

Permalink
bugfix: the terminal state was wrong and not reseted
Browse files Browse the repository at this point in the history
  • Loading branch information
Amrouche Hamza committed Apr 6, 2019
1 parent d45ecef commit f54389b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Component/Console/Helper/QuestionHelper.php
Expand Up @@ -254,6 +254,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu

// as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false.
if (false === $c || ('' === $ret && '' === $c && null === $question->getDefault())) {
shell_exec(sprintf('stty %s', $sttyMode));
throw new RuntimeException('Aborted.');
} elseif ("\177" === $c) { // Backspace Character
if (0 === $numMatches && 0 !== $i) {
Expand Down

0 comments on commit f54389b

Please sign in to comment.