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