Mercurial > hg > early-roguelike
comparison arogue7/options.c @ 150:a307ff9cd95e
arogue7: fix the backspace key in prompts.
md_readchar() now translates KEY_BACKSPACE to the erase character.
XRogue seems to work already.
author | John "Elwin" Edwards |
---|---|
date | Thu, 28 May 2015 09:41:29 -0400 |
parents | aac28331e71d |
children | f9ef86cf22b2 |
comparison
equal
deleted
inserted
replaced
149:9aa9b9a2e159 | 150:a307ff9cd95e |
---|---|
214 getyx(win, oy, ox); | 214 getyx(win, oy, ox); |
215 /* | 215 /* |
216 * loop reading in the string, and put it in a temporary buffer | 216 * loop reading in the string, and put it in a temporary buffer |
217 */ | 217 */ |
218 for (sp = buf; | 218 for (sp = buf; |
219 (c = wgetch(win)) != '\n' && | 219 (c = md_readchar(win)) != '\n' && |
220 c != '\r' && | 220 c != '\r' && |
221 c != '\033' && | 221 c != '\033' && |
222 c != '\007' && | 222 c != '\007' && |
223 sp < &buf[LINELEN-1]; | 223 sp < &buf[LINELEN-1]; |
224 wclrtoeol(win), draw(win)) | 224 wclrtoeol(win), draw(win)) |