bug fix 799

Solved by Styken, thanks dude!

the winqreadtextspace() function wants CTRL/ALT events, but also should
accept special characters that are sometimes behind an ALT on certain
keyboards (like [ ] in sweden).

In the old code all ALT events caused ascii to set on zero. Now it
checks first for ispunct() chars.
This commit is contained in:
Ton Roosendaal 2004-04-07 21:08:28 +00:00
parent 6710a87b5a
commit a93a6966b7

@ -979,8 +979,9 @@ void winqreadtextspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
Text *text= st->text;
int do_draw=0, p;
/* smartass code to prevent the events below from not working! */
if (!isprint(ascii) || (G.qual & ~LR_SHIFTKEY)) ascii= 0;
/* smartass code to prevent the CTRL/ALT events below from not working! */
if(!ispunct(ascii))
if (!isprint(ascii) || (G.qual & ~LR_SHIFTKEY)) ascii= 0;
text= st->text;