[squeak-dev] The Inbox: Morphic-ct.1585.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Jan 6 14:50:27 UTC 2020

Hmm... it's also not good that markBlock and pointBlock get reset in any case. Especially since there is this "+1" offset thingy compared to selectionInterval ... 

Am 10.11.2019 16:02:03 schrieb commits at source.squeak.org <commits at source.squeak.org>:
A new version of Morphic was added to project The Inbox:

==================== Summary ====================

Name: Morphic-ct.1585
Author: ct
Time: 10 November 2019, 4:01:42.092559 pm
UUID: 9564d2b2-4af1-044b-96fd-532e60252fd7
Ancestors: Morphic-mt.1584

TextEditor: Don't change the cursor position after a text action has been performed. This keeps a possible selection stable after you, for example, followed a link.

=============== Diff against Morphic-mt.1584 ===============

Item was changed:
----- Method: TextEditor>>mouseDown: (in category 'events') -----
mouseDown: evt
"Either 1) handle text actions in the paragraph, 2) begin a text drag operation, or 3) modify the caret/selection."

| clickPoint b |

oldInterval := self selectionInterval.
clickPoint := evt cursorPoint.
b := paragraph characterBlockAtPoint: clickPoint.

(paragraph clickAt: clickPoint for: model controller: self) ifTrue: [
- markBlock := b.
- pointBlock := b.
evt hand releaseKeyboardFocus: morph.
evt hand releaseMouseFocus: morph.
^ self ].

(morph dragEnabled and: [self isEventInSelection: evt]) ifTrue: [
evt hand
waitForClicksOrDrag: morph
event: evt
selectors: {#click:. nil. nil. #startDrag:}
threshold: HandMorph dragThreshold.
morph setProperty: #waitingForTextDrag toValue: true.
^ self].

evt shiftPressed
ifFalse: [
self closeTypeIn.
markBlock := b.
pointBlock := b ]
ifTrue: [
self closeTypeIn.
self mouseMove: evt ].
self storeSelectionInParagraph!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200106/b559585c/attachment.html>

More information about the Squeak-dev mailing list