• Jonah Williams's avatar
    [flutter_tools] handle terminals that do not support single char mode in... · 039f1cf8
    Jonah Williams authored
    [flutter_tools] handle terminals that do not support single char mode in Terminal.promptForCharInput (#65418)
    
    Some terminals stdin do not support single char mode (like an emacs terminal buffer apparently). If this is the case, then the presented choice values would always have an appended newline \n which would prevent us from finding the value in the listed index (or using it as a signal for the default choice). To fix, treat '' as the default choice and always trim the choice value.
    
    While this has seemingly always been broken, it wasn't noticeable until the multi-device selection prompt was added a few months ago.
    
    Fixes #65267
    039f1cf8
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.cirrus.yml Loading commit data...
.codecov.yml Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CODEOWNERS Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
PATENT_GRANT Loading commit data...
README.md Loading commit data...
analysis_options.yaml Loading commit data...
dartdoc_options.yaml Loading commit data...
flutter_console.bat Loading commit data...