gezelter@magnesium.cchem.berkeley.edu (Dan Gezelter; Miller) (05/13/91)
So I want to remap my L10 key on my Sun 3/50 to delete selected text in xedit. Fine. What I've done so far is to include the following lines in my .Xdefaults file: Xedit*messageWindow.scrollVertical: Always Xedit*editWindow.scrollVertical: Always Xedit*editWindow.Translations: #override \ <Key>L8: insert-selection(PRIMARY, CUT_BUFFER0) \n\ <Key>L10: delete-selection() which seems to work fine, as long as I'm not deleting text at the very end of a file. When I do that, xedit seems to be uninformed that there is no longer any text where it thinks the cursor is, and all hell breaks loose, leaving a messy segmentation fault all over the floor. Bad xedit, bad xedit. How do I prevent this from crashing so ungracefully? If you can answer that, then maybe you can address my wish list regarding delete thangs in general: What I really want is a delete key that, when pressed: 1) if I have any text selected, deletes that text and puts the cursor where that text used to be, 2) if I don't have any text selected, deletes the character immediately to the left of where I have the cursor now, and 3) doesn't crash the editor. Thanks in advance for your help. Via con carne, --Dan -- ____________________________________________________________________________ Ceci n'est pas un .sig. gezelter@lithium.cchem.berkeley.edu ----------------------------------------------------------------------------