<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
<span style="font-size: 13.3333px">With Tools-mt.929, I put a simple workaround for this into Trunk.</span><div style="font-size: 13.3333px"><br></div><div style="font-size: 13.3333px">This topic needs further discussion as it adresses multiple concerns.</div><div style="font-size: 13.3333px"><br></div><div style="font-size: 13.3333px">Best,</div><div style="font-size: 13.3333px">Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 06.01.2020 10:56:15 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">Hmm... did you test this with all kinds of scroll panes? Lists, trees, text fields ... I think we can fix that for text fields only.<div><br></div><div>I also dislike the separation of user-vs-program here. It produces code that is hard to maintain. It also smells like it disagrees with basic information hiding. Hmm....</div><div><br></div><div>For the 5.3 release, I would rather change that for debuggers only! :-) Just reverse the pc selection and you will be fine.<br><div class="mb_sig"></div>
<div><br></div><div>Best,</div><div>Marcel</div></div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 02.01.2020 22:55:58 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">Chris Muller uploaded a new version of Morphic to project The Inbox:<br>http://source.squeak.org/inbox/Morphic-cmm.1615.mcz<br><br>==================== Summary ====================<br><br>Name: Morphic-cmm.1615<br>Author: cmm<br>Time: 2 January 2020, 3:55:29.150586 pm<br>UUID: a6947cb4-e842-49ca-a8db-56b7f9f3241a<br>Ancestors: Morphic-mt.1612<br><br>When a text selection cannot fit into its text pane, show its upper-left, rather than its lower-right, so stepping through code in a small window is possible.<br><br>=============== Diff against Morphic-mt.1612 ===============<br><br>Item was added:<br>+ ----- Method: MorphicEvent>>isUserInput (in category 'testing') -----<br>+ isUserInput<br>+ ^ false!<br><br>Item was changed:<br> ----- Method: PluggableTextMorph>>handleEdit: (in category 'editor access') -----<br> handleEdit: editBlock<br> | result |<br> textMorph editor selectFrom: selectionInterval first to: selectionInterval last;<br> model: model. "For, eg, evaluateSelection"<br> result := textMorph handleEdit: editBlock. "Update selection after edit"<br>+ self scrollSelectionIntoView: UserInputEvent new. "Dummy event to control selection scrolling"<br>- self scrollSelectionIntoView.<br> ^ result!<br><br>Item was changed:<br> ----- Method: PluggableTextMorph>>scrollSelectionIntoView: (in category 'editor access') -----<br>+ scrollSelectionIntoView: event<br>- scrollSelectionIntoView: event <br> "Scroll my text into view. Due to line composition mechanism, we must never use the right of a character block because the lines last character block right value always comes from a global container and is *not* line specific."<br>+ self flag: #fixIntervalCache.<br>+ "mt: We should find a better design for discarding unused text editors in text morphs and restoring them on demand."<br>- <br>- self flag: #fixIntervalCache. "mt: We should find a better design for discarding unused text editors in text morphs and restoring them on demand."<br> selectionInterval := textMorph editor markIndex to: textMorph editor pointIndex - 1.<br>+ self scrollToShow:<br>+ (textMorph editor hasSelection<br>+ ifTrue: [ textMorph editor startBlock topLeft corner: textMorph editor stopBlock bottomLeft ]<br>+ ifFalse: [ textMorph editor startBlock withWidth: 1 ]).<br>+ (event notNil and: [ event isUserInput ]) ifTrue:<br>+ [ self scrollToShow: (textMorph editor pointBlock withWidth: 1) ].<br>- <br>- textMorph editor hasSelection<br>- ifFalse: [self scrollToShow: (textMorph editor startBlock withWidth: 1)]<br>- ifTrue: [<br>- self scrollToShow: (textMorph editor startBlock topLeft corner: textMorph editor stopBlock bottomLeft).<br>- self scrollToShow: (textMorph editor pointBlock withWidth: 1). "Ensure text cursor visibility."].<br>- <br> ^ true!<br><br>Item was changed:<br> ----- Method: ScrollPane>>keyStroke: (in category 'event handling') -----<br>+ keyStroke: aKeyboardEvent<br>+ "If pane is not empty, let the last submorph handle the event."<br>+ scroller submorphs ifNotEmpty: [ : subs | subs last keyStroke: aKeyboardEvent ]!<br>- keyStroke: evt<br>- "If pane is not empty, pass the event to the last submorph,<br>- assuming it is the most appropriate recipient (!!)"<br>- <br>- scroller submorphs last keyStroke: evt!<br><br>Item was changed:<br> ----- Method: ScrollPane>>offsetToShow: (in category 'scrolling') -----<br> offsetToShow: aRectangle<br> "Calculate the offset necessary to show the rectangle."<br> <br> | offset scrollRange target |<br> self fullBounds. "We need updated bounds."<br> offset := scroller offset.<br> scrollRange := self hTotalScrollRange @ self vTotalScrollRange.<br> <br> "Normalize the incoming rectangle."<br> target := <br>+ aRectangle left @ aRectangle top<br>- (scroller width < arectangle=""><br>- ifTrue: [offset x < arectangle="" left="" "coming="" from=""><br>- ifTrue: [aRectangle right - scroller width]<br>- ifFalse: [aRectangle left]]<br>- ifFalse: [aRectangle left])<br>- @<br>- (scroller height < arectangle=""><br>- ifTrue: [offset y < arectangle="" top="" "coming="" from=""><br>- ifTrue: [aRectangle bottom - scroller height]<br>- ifFalse: [aRectangle top]]<br>- ifFalse: [aRectangle top])<br> corner: <br> (scroller width < arectangle=""><br> ifTrue: [offset x + scroller width > aRectangle right "Coming from right?"<br> ifTrue: [aRectangle left + scroller width]<br> ifFalse: [aRectangle right]]<br> ifFalse: [aRectangle right])<br> @<br> (scroller height < arectangle=""><br> ifTrue: [offset y + scroller height > aRectangle bottom "Coming from bottom?"<br> ifTrue: [aRectangle top + scroller height]<br> ifFalse: [aRectangle bottom]]<br> ifFalse: [aRectangle bottom]).<br> <br> "Vertical Scrolling"<br>- target top < offset=""><br>- ifTrue: [offset := offset x @ target top]. <br> target bottom > (offset y + scroller height)<br> ifTrue: [offset := offset x @ (target bottom - scroller height)].<br>+ target top < offset=""><br>+ ifTrue: [offset := offset x @ target top]. <br> <br> "Horizontal Scrolling"<br>- target left < offset=""><br>- ifTrue: [offset := target left @ offset y].<br> target right > (offset x + scroller width)<br> ifTrue: [offset := (target right - scroller width) @ offset y].<br>+ target left < offset=""><br>+ ifTrue: [offset := target left @ offset y].<br> <br> ^ (offset min: scrollRange - scroller extent) max: 0@0!<br><br>Item was changed:<br> ----- Method: TextMorphForEditView>>keyStroke: (in category 'event handling') -----<br> keyStroke: evt<br> | view |<br> <br> editView deleteBalloon.<br> self editor model: editView model. "For evaluateSelection"<br> view := editView. "Copy into temp for case of a self-mutating doit"<br> (acceptOnCR and: [evt keyCharacter = Character cr])<br> ifTrue: [^ self editor accept].<br> <br> view hasUserEdited: false.<br> super keyStroke: evt.<br>+ view scrollSelectionIntoView: evt.<br>- view scrollSelectionIntoView.<br> <br> view hasUserEdited<br> ifTrue: [ view textEdited: self contents].!<br><br>Item was added:<br>+ ----- Method: UserInputEvent>>isUserInput (in category 'testing') -----<br>+ isUserInput<br>+ ^ true!<br><br><br></div></blockquote></div></div></blockquote>
</div></body>