TTY: Treat carriage return as newline
Before this change, more-prompts and input text -prompts could not be accepted with carriage return. Now, just like in menus, carriage return is treated the same as a newline. To test, use 'stty -icrnl'
This commit is contained in:
@@ -1167,6 +1167,8 @@ tty_askname()
|
||||
while ((c = tty_nhgetch()) != '\n') {
|
||||
if (c == EOF)
|
||||
c = '\033';
|
||||
if (c == '\r')
|
||||
break;
|
||||
if (c == '\033') {
|
||||
ct = 0;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user