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:
parent
fef5939ab1
commit
5a25cd89da
3 changed files with 7 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue