Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.2123.mcz
==================== Summary ====================
Name: Morphic-mt.2123 Author: mt Time: 18 August 2023, 11:50:17.756619 am UUID: 50623e86-951e-4644-8755-68603d683800 Ancestors: Morphic-mt.2122
Remove some dead code that has been around since 4.3 but was never used. #isParagraphAttribute was also never implemented.
See #changeEmphasis:. There, #replaceSelectionWith: works just fine.
=============== Diff against Morphic-mt.2122 ===============
Item was removed: - ----- Method: TextEditor>>applyAttribute: (in category 'private') ----- - applyAttribute: aTextAttribute - "The user selected aTextAttribute via shortcut, menu or other means. - If there is a selection, apply the attribute to the selection. - In any case use the attribute for the user input (emphasisHere)" - | interval | - - emphasisHere := Text addAttribute: aTextAttribute toArray: emphasisHere. - - interval := self selectionInterval. - (interval isEmpty and: [ aTextAttribute isParagraphAttribute not ]) - ifTrue: [ ^self ]. - - self text addAttribute: aTextAttribute from: interval first to: interval last. - paragraph recomposeFrom: interval first to: interval last delta: 0. - self recomputeSelection. "Needed so visible selection is updated to reflect new visual extent of selection" - morph changed!
Item was removed: - ----- Method: TextEditor>>unapplyAttribute: (in category 'private') ----- - unapplyAttribute: aTextAttribute - "The user selected aTextAttribute to be removed. - If there is a selection, unapply the attribute to the selection. - In any case do not use the attribute for the user input (emphasisHere)" - - | interval | - - emphasisHere := emphasisHere copyWithout: aTextAttribute. - - interval := self selectionInterval. - (interval isEmpty and: [ aTextAttribute isParagraphAttribute not ]) - ifTrue: [ ^self ]. - - self text removeAttribute: aTextAttribute from: interval first to: interval last. - paragraph recomposeFrom: interval first to: interval last delta: 0. - self recomputeSelection. "Needed so visible selection is updated to reflect new visual extent of selection" - morph changed!
packages@lists.squeakfoundation.org