[squeak-dev] The Trunk: Morphic-mt.1932.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 14 09:02:31 UTC 2022


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

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

Name: Morphic-mt.1932
Author: mt
Time: 14 March 2022, 10:02:24.651667 am
UUID: c8609f8b-c215-694e-9b4f-179e7791069b
Ancestors: Morphic-mt.1931

Fixes regression in text-morph editing for text morphs that are not inside a cozy scroll container. :-)

=============== Diff against Morphic-mt.1931 ===============

Item was changed:
  ----- Method: NewParagraph>>recomposeFrom:to:delta: (in category 'composition') -----
  recomposeFrom: start to: stop delta: delta
  	"Recompose this paragraph.  The altered portion is between start and stop.
  	Recomposition may continue to the end of the text, due to a ripple effect.
  	Delta is the amount by which the current text is longer than it was
  	when its current lines were composed."
  	| startLine newLines |
  	containerUnadjusted ifNotNil: [
+ 		"Somebody called #adjustRightX. We must recompose everything to
+ 		avoid strange line breaks and clipping."
+ 		container := container topLeft extent: containerUnadjusted extent.
+ 		self composeAll; adjustRightX.
+ 		^ self].
- 		"Somebody called #adjustRightX. We must recompose everything to avoid strange line breaks and clipping."
- 		container := containerUnadjusted. self composeAll; adjustRightX. ^ self].
  
  	"Have to recompose line above in case a word-break was affected."
  	startLine := (self lineIndexOfCharacterIndex: start) - 1 max: 1.
  	[startLine > 1 and: [(lines at: startLine-1) top = (lines at: startLine) top]]
  		whileTrue: [startLine := startLine - 1].  "Find leftmost of line pieces"
  	newLines := OrderedCollection new: lines size + 1.
  	1 to: startLine-1 do: [:i | newLines addLast: (lines at: i)].
  	self composeLinesFrom: (lines at: startLine) first to: stop delta: delta
  			into: newLines priorLines: lines
  			atY: (lines at: startLine) top!



More information about the Squeak-dev mailing list