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

Tobias Pape Das.Linux at gmx.de
Wed Apr 27 19:30:44 UTC 2022


Class variable anyone?
-t

> On 27. Apr 2022, at 21:22, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
> 
> Ah, is it robust to future editions?
> Not that I would recommend it, but here is a very ugly trick that still works in trunk:
>     'abc' , #[13 10]
> More reasonably, I think that we can afford this small concatenation
>     'abc' , String crlf
> 
> Le mer. 27 avr. 2022 à 16:57, <commits at source.squeak.org> a écrit :
> 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