diff rogue4/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 3c5682bbf164
children 65f3da34578a
line wrap: on
line diff
--- 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;