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

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon Apr 25 10:50:47 UTC 2022


Hi Marcel,
does if work for Character lf?
I know that we traditionally use Character cr in Squeak conventions, but we
have made Text rendering work with polymorphic line-end a few years back.
So Character lf might occur here and there, even in source code without our
notice.

Le lun. 25 avr. 2022 à 11:19, <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.1970.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-mt.1970
> Author: mt
> Time: 25 April 2022, 11:19:24.059234 am
> UUID: e5dd0f85-4aac-af44-a042-214fc331babf
> Ancestors: Morphic-mt.1969
>
> Fixes (older) regression where line breaks did not count as a boundary
> character, which made word-by-word jumping feel wrong.
>
> =============== Diff against Morphic-mt.1969 ===============
>
> 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 := ')]}''"|^.
> + '.
> -       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 := '([{''"|^.
> + '.
> -       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!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220425/5df22677/attachment.html>


More information about the Squeak-dev mailing list