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'
win32gui: gather raw_print error messages into a single dialog window
win32tty: fix display errors when using a font with double wide or ambiguous
width characters
+tty: treat carriage return as a newline for input text and more-prompts
General New Features
#endif /* NEWAUTOCOMP */
} else
tty_nhbell();
-#if defined(apollo)
} else if (c == '\n' || c == '\r') {
-#else
- } else if (c == '\n') {
-#endif
#ifndef NEWAUTOCOMP
*bufp = 0;
#endif /* not NEWAUTOCOMP */
!program_state.done_hup &&
#endif
(c = tty_nhgetch()) != EOF) {
- if (c == '\n')
+ if (c == '\n' || c == '\r')
break;
if (iflags.cbreak) {
morc = '\033';
break;
}
- if ((s && index(s, c)) || c == x) {
+ if ((s && index(s, c)) || c == x || (x == '\n' && c == '\r')) {
morc = (char) c;
break;
}
while ((c = tty_nhgetch()) != '\n') {
if (c == EOF)
c = '\033';
+ if (c == '\r')
+ break;
if (c == '\033') {
ct = 0;
break;