[squeak-dev] The Trunk: Morphic-mt.1974.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Apr 27 14:57:32 UTC 2022


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1974.mcz

==================== Summary ====================

Name: Morphic-mt.1974
Author: mt
Time: 27 April 2022, 4:57:27.371228 pm
UUID: bbf92ccb-7fe1-7f4b-9ab6-955f0f2ba601
Ancestors: Morphic-mt.1973

For by-word jumping in text fields, adds LF to the literal array of boundary characters.

Thanks to Nicolas (nice) for the hint!

=============== Diff against Morphic-mt.1973 ===============

Item was changed:
  ----- Method: SmalltalkEditor>>nextWord: (in category 'private') -----
  nextWord: position 
  	| string index boundaryCharacters |
  	string := self string.
  	index := position - 1.
  	[ (index
  		between: 1
  		and: string size) and: [ (string at: index) isSeparator ] ] whileTrue: [ index := index + 1 ].
  	boundaryCharacters := ')]}''"|^. 	
  '.
+ 
  	((index
  		between: 1
  		and: string size) and: [ boundaryCharacters includes: (string at: index) ])
  		ifTrue:
  			[  index := index + 1  ]
  		ifFalse:
  			[ [ (index
  				between: 1
  				and: string size) and: [ (boundaryCharacters includes: (string at: index)) not ] ] whileTrue: [ index := index + 1 ] ].
  	^ index!

Item was changed:
  ----- Method: SmalltalkEditor>>previousWord: (in category 'private') -----
  previousWord: position 
  	| string index boundaryCharacters |
  	string := self string.
  	index := position.
  	"First, get out of whitespace."
  	[ (index
  		between: 2
  		and: string size) and: [ (string at: index) isSeparator ] ] whileTrue: [ index := index - 1 ].
  	boundaryCharacters := '([{''"|^. 	
  '.
+ 
  	"Are we at a boundary character?"
  	((index
  		between: 2
  		and: string size) and: [ boundaryCharacters includes: (string at: index) ])
  		ifTrue:
  			[ "yes, select it and any following whitespace of this line."
  			index := index - 1 ]
  		ifFalse:
  			[ "no, select to the next boundary character"
  			[ (index
  				between: 1
  				and: string size) and: [ (boundaryCharacters includes: (string at: index)) not ] ] whileTrue: [ index := index - 1 ] ].
  	^ index + 1!



More information about the Squeak-dev mailing list