Red Hat Bugzilla – Bug 31540
Xaw Text widget puts text in the wrong place after right-paren is typed
Last modified: 2007-04-18 12:32:08 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17curl1 i686)
The current version of the Xaw library in XFree86 has this nifty whiz-bang
feature to make it look more like Emacs -- when you type a right-paren, it
flashes the cursor briefly back to the open paren that you're closing.
This is all well and good unless you happen to type something in the half
second during which the cursor is over the open paren. I do this all the
time, because I type very fast (80 WPM). If you do this, your cursor, and
any text that you subsequently type, will end up in the wrong place. How
I will attach a patch which prevents this from happening by immediately
ceasing and desisting from processing pending events during the cursor
flash if/when the first event on the queue is either not an X event or is a
KeyPress or ButtonPress event, thus indicating that additional input has
been entered by the user and it should be processed.
This is equivalent to Emacs' behavior -- if Emacs gets additional input
while it is showing you an open paren, it immediately moves back to the
correct input location and processes the new input.
You should submit my patch back to the maintainers of XFree86. I'm not
doing it because I see that RedHat has modified the block of code that I'm
patching, so the patch I'm submitting should probably be submitted to the
XFree86 maintainers along with RedHat's other modifications.
Steps to Reproduce:
Run xedit. Type some text. Type an open paren. Type some more text.
Type a close paren and then immediately type some more text while the
cursor is flashing back to the open paren. It helps to do this over a
dialup connection or some other slow network connection rather than
directly on a local display -- the delay in transmitting of events caused
by the slow connection seems to make the problem more obvious.
Created attachment 12422 [details]
Patch to fix this bug
Added to rawhide 4.0.3-4, thanks again for your patches.