[squeak-dev] The Trunk: ST80-nice.254.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 8 16:38:02 UTC 2020


Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.254.mcz

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

Name: ST80-nice.254
Author: nice
Time: 8 May 2020, 6:37:59.968801 pm
UUID: b793958a-326b-463e-b3d0-db17fd8aab42
Ancestors: ST80-mt.253

Add a new #selectIntervalInvisibly: method used for interactive correction in Parser.

The Parser wants to interact with the editor so as to perform correction.
But it also want to restore the (eventually slightly modified) user selection once the corrections are performed.

When chaining several corrections, this might create an annoying flashing effect, going from user selection to correction zone back and forth.

In order to avoid such flashing effect, the Parser did request to #select the error zone, #deselect, then #selectInvisiblyFrom:to: the previous user selection.

But only st80 ParagraphEditor needs to select and deselect.
Those are implementation details not required in Morphic Editor, so it's better to provide a new message dedicated to this task and let the responsibility of select/deselect to the editor.

=============== Diff against ST80-mt.253 ===============

Item was added:
+ ----- Method: ParagraphEditor>>selectIntervalInvisibly: (in category 'new selection') -----
+ selectIntervalInvisibly: anInterval
+ 	"Deselect, then select the specified characters inclusive.
+ 	 Do not yet make the new selection visible."
+ 
+ 	self deselect.
+ 	self selectInvisiblyFrom: anInterval first to: anInterval last!



More information about the Squeak-dev mailing list