arogue7: fix the backspace key in prompts.

md_readchar() now translates KEY_BACKSPACE to the erase character.

XRogue seems to work already.
This commit is contained in:
John "Elwin" Edwards 2015-05-28 09:41:29 -04:00
parent d793ca961f
commit b369d09125
2 changed files with 5 additions and 1 deletions

View file

@ -1117,6 +1117,10 @@ md_readchar(WINDOW *win)
#endif
case KEY_NPAGE : ch = 'n'; break;
#ifdef KEY_BACKSPACE
case KEY_BACKSPACE: ch = md_erasechar(); break;
#endif
#ifdef KEY_B1
case KEY_B1 : ch = 'h'; break;
case KEY_C2 : ch = 'j'; break;

View file

@ -216,7 +216,7 @@ WINDOW *win;
* loop reading in the string, and put it in a temporary buffer
*/
for (sp = buf;
(c = wgetch(win)) != '\n' &&
(c = md_readchar(win)) != '\n' &&
c != '\r' &&
c != '\033' &&
c != '\007' &&