On Fri, 21 Feb 2003, Angus Leeming wrote: > > It looks to me that this piece of code is meant to remove highlighted text. > Somethink like, mark a block of text with the cursor key and press any key. > The highlighted block is replaced by your key. >
Yes, I just confirmed your guess. > What happens to the beginrange, endrange values when you mark text? > When I mark the text, no signal enters the draw_char. However after marking the text, pressing any key entres the block and in this case, "sp->beginrange=0, sp->endrange > 0" are obtained. > This being the case, it doesn't anwser WHY the block is entered in your > case. Is endcase not initialised to zero when the input widget is created? I have no idea. But on other xform widget, all the sigals(the first or the subsequent ones) have, "beginrange = 0, endrange = -1" In "Edit->Find..." widget, the first signal(whether it is ascii letter 'a', or CJK-char) has "beginrange = 0, endrange = 0". This being the case, the English letter is not swallowed. Even on this widget, all the subsequent signals have "beginrange = 0, endramge = -1". > Sounds like something is not initialised, doesn't it. > Ya, I feel strongly so. > Sure. I've been busy too ;-) > It looks fine but I haven't tried it out yet. The last time I did so, I > found that my font server started consuming 100% of CPU. Have you any idea > why? > My apology if I push you too much on this. cghan