arogue7: fix the backspace key in prompts.
md_readchar() now translates KEY_BACKSPACE to the erase character. XRogue seems to work already.
This commit is contained in:
parent
d793ca961f
commit
b369d09125
2 changed files with 5 additions and 1 deletions
|
|
@ -1117,6 +1117,10 @@ md_readchar(WINDOW *win)
|
||||||
#endif
|
#endif
|
||||||
case KEY_NPAGE : ch = 'n'; break;
|
case KEY_NPAGE : ch = 'n'; break;
|
||||||
|
|
||||||
|
#ifdef KEY_BACKSPACE
|
||||||
|
case KEY_BACKSPACE: ch = md_erasechar(); break;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef KEY_B1
|
#ifdef KEY_B1
|
||||||
case KEY_B1 : ch = 'h'; break;
|
case KEY_B1 : ch = 'h'; break;
|
||||||
case KEY_C2 : ch = 'j'; break;
|
case KEY_C2 : ch = 'j'; break;
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@ WINDOW *win;
|
||||||
* loop reading in the string, and put it in a temporary buffer
|
* loop reading in the string, and put it in a temporary buffer
|
||||||
*/
|
*/
|
||||||
for (sp = buf;
|
for (sp = buf;
|
||||||
(c = wgetch(win)) != '\n' &&
|
(c = md_readchar(win)) != '\n' &&
|
||||||
c != '\r' &&
|
c != '\r' &&
|
||||||
c != '\033' &&
|
c != '\033' &&
|
||||||
c != '\007' &&
|
c != '\007' &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue