diff rogue3/mdport.c @ 94:ba9930a7f99d

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.
author John "Elwin" Edwards
date Tue, 27 Aug 2013 09:25:30 -0700
parents 07c4d4883ef2
children 600873555ec0
line wrap: on
line diff
--- 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
 	}