icapon@registry.adelaide.edu.au (Nick Capon) (06/06/91)
I have a project which relies heavily on the user seeing a current selection in a text. Maintaining that selection, and editing it, is an interesting task. Without thought I wrote two adjacent lines of code to operate on a selection "put a into the selection put b into the selection" and the result is "ab". However if the selection is c, and the into's are replaced by 'before' then the result is "acb". Obvious? On investigation, the rules are when material is put into|before|after a selection there is no resultant non null selection. However there is an insertion point at the RIGHT end of the original selection. material can be put into|before|after a selection point with the same result, which is consistent. You never know when this might be useful.....