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

Marcel Taeumel marcel.taeumel at hpi.de
Wed Apr 27 14:58:25 UTC 2022


Hi Nicolas --

Should now work for LF as well. See Morphic-mt.1974.

(It's not that easy to get that LF character into the source code. Hehe.)

Best,
Marcel
Am 25.04.2022 12:51:10 schrieb Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
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 [mailto: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 [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/20220427/a1c6436f/attachment.html>


More information about the Squeak-dev mailing list