comparison 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
comparison
equal deleted inserted replaced
93:8f7c082fde46 94:ba9930a7f99d
1379 case ALT_PAD6 : ch = CTRL('L'); break; 1379 case ALT_PAD6 : ch = CTRL('L'); break;
1380 case ALT_PAD7 : ch = CTRL('Y'); break; 1380 case ALT_PAD7 : ch = CTRL('Y'); break;
1381 case ALT_PAD8 : ch = CTRL('K'); break; 1381 case ALT_PAD8 : ch = CTRL('K'); break;
1382 case ALT_PAD9 : ch = CTRL('U'); break; 1382 case ALT_PAD9 : ch = CTRL('U'); break;
1383 #endif 1383 #endif
1384 #ifdef KEY_BACKSPACE /* NCURSES in Keypad mode sends this for Ctrl-H */ 1384 #ifdef KEY_BACKSPACE
1385 case KEY_BACKSPACE: ch = CTRL('H'); break; 1385 case KEY_BACKSPACE: ch = md_erasechar(); break;
1386 #endif 1386 #endif
1387 } 1387 }
1388 1388
1389 break; 1389 break;
1390 } 1390 }