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

Marcel Taeumel marcel.taeumel at hpi.de
Fri Apr 8 08:02:10 UTC 2022

Since there is #setEmphasisHere, I would call that #clearEmphasisHere or actually #setNoEmphasisHere.

Am 02.04.2022 19:58:01 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.1959
Author: ct
Time: 2 April 2022, 7:56:53.015869 pm
UUID: 1f80acc4-dd90-8a47-b327-cea807b2e8f3
Ancestors: Morphic-ul.1956

Resets emphasis when cancelling the edits in a text morph.

This bug can be reproduced by doing:
'plonk' edit.
And then pressing 7, 0 into the editor.

MVC was not affected by this bug, I checked.

Please review.

=============== Diff against Morphic-ul.1956 ===============

Item was changed:
----- Method: PluggableTextMorph>>cancelSafely (in category 'menu commands') -----
"Cancel all edits by replacing the content with the original contents. Retain the undo history. The model can intervene via #okToRevertChanges, which is beneficial if all edits have already be communicated via #textEdited: so that the model can cancel its internal caches."

(model respondsTo: #okToRevertChanges:) ==> [model okToRevertChanges: editTextSelector]
ifFalse: [^ self].

self handleEdit: [
+ textMorph editor
+ resetEmphasisHere;
+ replaceAllWith: self getText.
- textMorph editor replaceAllWith: self getText.
self selectInterval: self getSelection.
self hasUnacceptedEdits: false.
self hasUserEdited: false].!

Item was added:
+ ----- Method: TextEditor>>resetEmphasisHere (in category 'typing support') -----
+ resetEmphasisHere
+ emphasisHere := #().!

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

More information about the Squeak-dev mailing list