rogue[345]: fix backspace key in prompts.

md_readchar() mapped KEY_BACKSPACE to CTRL-H, but get_str(), which
handles prompts for strings, only backs up when it receives the erase
character.  The key should be mapped to md_erasechar().

This fixes Red Hat Bugzilla #847852.
This commit is contained in:
John "Elwin" Edwards 2013-08-27 09:25:30 -07:00
parent fef5939ab1
commit 5a25cd89da
3 changed files with 7 additions and 4 deletions

View file

@ -1381,8 +1381,8 @@ md_readchar(WINDOW *win)
case ALT_PAD8 : ch = CTRL('K'); break;
case ALT_PAD9 : ch = CTRL('U'); break;
#endif
#ifdef KEY_BACKSPACE /* NCURSES in Keypad mode sends this for Ctrl-H */
case KEY_BACKSPACE: ch = CTRL('H'); break;
#ifdef KEY_BACKSPACE
case KEY_BACKSPACE: ch = md_erasechar(); break;
#endif
}

View file

@ -1305,6 +1305,9 @@ md_readchar(WINDOW *win)
case ALT_PAD7 : ch = MOD_MOVE('Y'); break;
case ALT_PAD8 : ch = MOD_MOVE('K'); break;
case ALT_PAD9 : ch = MOD_MOVE('U'); break;
#endif
#ifdef KEY_BACKSPACE
case KEY_BACKSPACE: ch = md_erasechar(); break;
#endif
}

View file

@ -1384,8 +1384,8 @@ md_readchar(WINDOW *win)
case ALT_PAD8 : ch = CTRL('K'); break;
case ALT_PAD9 : ch = CTRL('U'); break;
#endif
#ifdef KEY_BACKSPACE /* NCURSES in Keypad mode sends this for Ctrl-H */
case KEY_BACKSPACE: ch = CTRL('H'); break;
#ifdef KEY_BACKSPACE
case KEY_BACKSPACE: ch = md_erasechar(); break;
#endif
}