<div dir="ltr"><div><div>Not sure if it&#39;s OK for anything else than leftFlush, but this one was upsetting me for a while<br></div>(inspector panes are often narrow in debuggers)<br><br></div>And +1000 thanks for restoring the review-by-mail feature while now providing full MC history<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-27 2:35 GMT+02:00  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nicolas Cellier uploaded a new version of Morphic to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Morphic-nice.1313.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/<wbr>trunk/Morphic-nice.1313.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-nice.1313<br>
Author: nice<br>
Time: 27 October 2016, 2:34:24.410239 am<br>
UUID: b6649d12-cd6a-4957-94c0-<wbr>ddc37d0f253a<br>
Ancestors: Morphic-tpr.1312<br>
<br>
Correct the text selection when extending down over a long word that was rejected on next line.<br>
<br>
The scenario is when a long word following a space does not fit on the end of line: it is displayed on next line.<br>
If user click right after the space and extend the selection by dragging down on next line, then the selection from left of next line to right of space is not displayed.<br>
<br>
This is because the start CharacterBlock has its topLeft = space topRight (+ eventual kern).<br>
Fortunately, a simple &lt;= test instead of &lt; solves the problem.<br>
<br>
=============== Diff against Morphic-tpr.1312 ===============<br>
<br>
Item was changed:<br>
  ----- Method: NewParagraph&gt;&gt;<wbr>displaySelectionInLine:on: (in category &#39;display&#39;) -----<br>
  displaySelectionInLine: line on: aCanvas<br>
        | leftX rightX w |<br>
        selectionStart ifNil: [^self].  &quot;No selection&quot;<br>
        aCanvas isShadowDrawing ifTrue: [ ^self ].      &quot;don&#39;t draw selection with shadow&quot;<br>
        selectionStart = selectionStop<br>
                ifTrue:<br>
                        [&quot;Only show caret on line where clicked&quot;<br>
<br>
                        selectionStart textLine ~= line ifTrue: [^self]]<br>
                ifFalse:<br>
                        [&quot;Test entire selection before or after here&quot;<br>
<br>
                        (selectionStop stringIndex &lt; line first<br>
                                or: [selectionStart stringIndex &gt; (line last + 1)]) ifTrue: [^self].    &quot;No selection on this line&quot;<br>
                        (selectionStop stringIndex = line first<br>
                                and: [selectionStop textLine ~= line]) ifTrue: [^self]. &quot;Selection ends on line above&quot;<br>
                        (selectionStart stringIndex = (line last + 1)<br>
                                and: [selectionStop textLine ~= line]) ifTrue: [^self]].        &quot;Selection begins on line below&quot;<br>
+       leftX := (selectionStart stringIndex &lt;= line first<br>
-       leftX := (selectionStart stringIndex &lt; line first<br>
                                ifTrue: [line ]<br>
                                ifFalse: [selectionStart ])left.<br>
        rightX := (selectionStop stringIndex &gt; (line last + 1) or:<br>
                                        [selectionStop stringIndex = (line last + 1)<br>
                                                and: [selectionStop textLine ~= line]])<br>
                                ifTrue: [line right]<br>
                                ifFalse: [selectionStop left].<br>
        selectionStart = selectionStop<br>
                ifTrue: [<br>
                        rightX := rightX + 1.<br>
                        caretRect := (leftX-2) @ line top corner: (rightX+2)@ line bottom. &quot;sigh...&quot;<br>
                        self showCaret ifFalse: [^self].<br>
                        w := (Editor dumbbellCursor<br>
                                ifTrue: [self displayDumbbellCursorOn: aCanvas at: leftX in: line]<br>
                                ifFalse: [self displaySimpleCursorOn: aCanvas at: leftX in: line]).<br>
                        caretRect := (leftX-w) @ line top corner: (rightX+w)@ line bottom]<br>
                ifFalse: [<br>
                        caretRect := nil.<br>
                        aCanvas fillRectangle: (leftX @ line top corner: rightX @ line bottom)<br>
                                color: (self focused ifTrue: [self selectionColor] ifFalse: [self unfocusedSelectionColor])]!<br>
<br>
<br>
</blockquote></div><br></div>