The Trunk: Morphic-mt.803.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.803.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.803.mcz

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

Name: Morphic-mt.803
Author: mt
Time: 1 April 2015, 4:41:58.498 pm
UUID: 2b489690-f83f-5e41-82a7-cfba13ce7e54
Ancestors: Morphic-mt.802

Recompose the paragraph if text or runs changed after keyboard input.

We did not notice this bug because Shout/Tools did this in #stylerStyled:. Only some jerky scrolling behavior occured from time to time because the first text morph update (while Shout was background-styling) was without paragraph recomposition.

=============== Diff against Morphic-mt.802 ===============

Item was changed:
  ----- Method: TextMorph>>handleInteraction:fromEvent: (in category 'editing') -----
  handleInteraction: interactionBlock fromEvent: evt
  "Perform the changes in interactionBlock, noting any change in selection
  and possibly a change in the size of the paragraph (ar 9/22/2001 - added for TextPrintIts)"
  | oldEditor oldParagraph oldText |
  oldEditor := editor.
  oldParagraph := paragraph.
  oldText := oldParagraph text copy.
 
  self selectionChanged.  "Note old selection"
 
  interactionBlock value.
 
  (oldParagraph == paragraph) ifTrue:[
  "this will not work if the paragraph changed"
  editor := oldEditor.     "since it may have been changed while in block"
  ].
  self selectionChanged.  "Note new selection"
  (oldText = paragraph text and: [ oldText runs = paragraph text runs ])
+ ifFalse:[
+ self paragraph composeAll.
+ self updateFromParagraph ].
- ifFalse:[ self updateFromParagraph ].
  self setCompositionWindow.!