<div dir="ltr"><div>Ah, is it robust to future editions?</div><div>Not that I would recommend it, but here is a very ugly trick that still works in trunk:</div><div>    'abc' , #[13 10]</div><div>More reasonably, I think that we can afford this small concatenation<br></div><div>     'abc' , String crlf<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 27 avr. 2022 à 16:57, <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Marcel Taeumel uploaded a new version of Morphic to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Morphic-mt.1974.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/Morphic-mt.1974.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-mt.1974<br>
Author: mt<br>
Time: 27 April 2022, 4:57:27.371228 pm<br>
UUID: bbf92ccb-7fe1-7f4b-9ab6-955f0f2ba601<br>
Ancestors: Morphic-mt.1973<br>
<br>
For by-word jumping in text fields, adds LF to the literal array of boundary characters.<br>
<br>
Thanks to Nicolas (nice) for the hint!<br>
<br>
=============== Diff against Morphic-mt.1973 ===============<br>
<br>
Item was changed:<br>
  ----- Method: SmalltalkEditor>>nextWord: (in category 'private') -----<br>
  nextWord: position <br>
        | string index boundaryCharacters |<br>
        string := self string.<br>
        index := position - 1.<br>
        [ (index<br>
                between: 1<br>
                and: string size) and: [ (string at: index) isSeparator ] ] whileTrue: [ index := index + 1 ].<br>
        boundaryCharacters := ')]}''"|^.        <br>
  '.<br>
+ <br>
        ((index<br>
                between: 1<br>
                and: string size) and: [ boundaryCharacters includes: (string at: index) ])<br>
                ifTrue:<br>
                        [  index := index + 1  ]<br>
                ifFalse:<br>
                        [ [ (index<br>
                                between: 1<br>
                                and: string size) and: [ (boundaryCharacters includes: (string at: index)) not ] ] whileTrue: [ index := index + 1 ] ].<br>
        ^ index!<br>
<br>
Item was changed:<br>
  ----- Method: SmalltalkEditor>>previousWord: (in category 'private') -----<br>
  previousWord: position <br>
        | string index boundaryCharacters |<br>
        string := self string.<br>
        index := position.<br>
        "First, get out of whitespace."<br>
        [ (index<br>
                between: 2<br>
                and: string size) and: [ (string at: index) isSeparator ] ] whileTrue: [ index := index - 1 ].<br>
        boundaryCharacters := '([{''"|^.        <br>
  '.<br>
+ <br>
        "Are we at a boundary character?"<br>
        ((index<br>
                between: 2<br>
                and: string size) and: [ boundaryCharacters includes: (string at: index) ])<br>
                ifTrue:<br>
                        [ "yes, select it and any following whitespace of this line."<br>
                        index := index - 1 ]<br>
                ifFalse:<br>
                        [ "no, select to the next boundary character"<br>
                        [ (index<br>
                                between: 1<br>
                                and: string size) and: [ (boundaryCharacters includes: (string at: index)) not ] ] whileTrue: [ index := index - 1 ] ].<br>
        ^ index + 1!<br>
<br>
<br>
</blockquote></div>