# HG changeset patch # User John "Elwin" Edwards # Date 1377620730 25200 # Node ID ba9930a7f99de882298e411b1bec40184ddde6ad # Parent 8f7c082fde4642a2dbbd14f742b4a596ecc36855 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. diff -r 8f7c082fde46 -r ba9930a7f99d rogue3/mdport.c --- a/rogue3/mdport.c Mon Aug 26 19:58:44 2013 -0700 +++ b/rogue3/mdport.c Tue Aug 27 09:25:30 2013 -0700 @@ -1381,8 +1381,8 @@ 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 } diff -r 8f7c082fde46 -r ba9930a7f99d rogue4/mdport.c --- a/rogue4/mdport.c Mon Aug 26 19:58:44 2013 -0700 +++ b/rogue4/mdport.c Tue Aug 27 09:25:30 2013 -0700 @@ -1306,6 +1306,9 @@ 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 } break; diff -r 8f7c082fde46 -r ba9930a7f99d rogue5/mdport.c --- a/rogue5/mdport.c Mon Aug 26 19:58:44 2013 -0700 +++ b/rogue5/mdport.c Tue Aug 27 09:25:30 2013 -0700 @@ -1384,8 +1384,8 @@ 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 }