'From Squeak3.7alpha of ''11 September 2003'' [latest update: #5501] on 31 October 2003 at 9:01:04 am'! "Change Set: ShrinkingSelection-cursorEnd Date: 31 October 2003 Author: torge husfeldt torge husfeldt wrote: BTW, i found a small bug wrt #cursorEnd: in boundary cases and an oddity with printIt: Try selecting a smalltalk expression right-to-left and then hit -p. Fixes to both attached. md: better name, preamble, mailed to the list in the correct way, so it does not get lost"! !ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 10/28/2003 10:47'! cursorEnd: characterStream "Private - Move cursor end of current line." | string | self closeTypeIn: characterStream. string _ paragraph text string. self moveCursor: [:position | Preferences wordStyleCursorMovement ifTrue:[| targetLine | targetLine _ paragraph lines at:(paragraph lineIndexOfCharacterIndex: position). targetLine = paragraph lines last ifTrue:[targetLine last + 1] ifFalse:[targetLine last]] ifFalse:[ string indexOf: Character cr startingAt: position ifAbsent:[string size + 1]]] forward: true specialBlock:[:dummy | string size + 1]. ^true! ! !ParagraphEditor methodsFor: 'new selection' stamp: 'th 10/28/2003 12:11'! afterSelectionInsertAndSelect: aString self insertAndSelect: aString at: self stopIndex ! !