Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!kit From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: xedit is brain-damaged Message-ID: <9002012117.AA26263@expo.lcs.mit.edu> Date: 1 Feb 90 21:17:34 GMT References: <1990Feb1.052556.10747@arp.anu.oz.au> Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 66 Brain damaged? Perhaps a bit buggy, but brain damaged? :-) > Xedit then did the following thing: it would > find the first occurrence of ~, then it would convert it to \~, > then it would position the insert cursor in front of \~, would find > ~ again (the same one!), would put a second \ in front of ~, and > so ad infinitum. In any case, you have found a real bug in the Text widget, here is an "unofficial" patch to ``lib/Xaw/TextPop.c'' that will solve your problem. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213 ----- cut here ----------- *** /tmp/,RCSt1002877 Thu Feb 1 16:19:51 1990 --- lib/Xaw/TextPop.c Thu Feb 1 15:38:27 1990 *************** *** 949,954 return(FALSE); } if (once_only) if (show_current) break; --- 949,959 ----- return(FALSE); } + if (dir == XawsdRight) + XawTextSetInsertionPoint( tw, pos + replace.length); + else + XawTextSetInsertionPoint( tw, pos); + if (once_only) if (show_current) break; *************** *** 958,968 } count++; } - - if (dir == XawsdRight) - XawTextSetInsertionPoint( tw, pos + replace.length); - else - XawTextSetInsertionPoint( tw, pos); if (replace.length == 0) XawTextUnsetSelection(tw); --- 963,968 ----- } count++; } if (replace.length == 0) XawTextUnsetSelection(tw);