Bug 31540

Summary: Xaw Text widget puts text in the wrong place after right-paren is typed
Product: [Retired] Red Hat Linux Reporter: Jonathan Kamens <jik>
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-03-14 10:10:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to fix this bug none

Description Jonathan Kamens 2001-03-12 18:48:52 UTC
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
irritating.

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.


Reproducible: Always
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.

Comment 1 Jonathan Kamens 2001-03-12 18:49:37 UTC
Created attachment 12422 [details]
Patch to fix this bug

Comment 2 Mike A. Harris 2001-03-27 08:02:10 UTC
Added to rawhide 4.0.3-4, thanks again for your patches.