<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Hi all --<div><br></div><div>I have no objection here. Actually, a strong +1 because the current form is incompatible with scale factor larger than 100% and thus high-dpi.</div><div><br></div><div>If one would reformat comments, I would strongly suggest to NOT define line breaks via pixels but only based on a sane lines-per-character default. Maybe -- and only because Squeak uses proportional fonts by default -- use the text-layout algorithm to figure out the breaks. See Text >> #withNoLineLongerThan: so learn more about how this could work for the pretty-printer as well.</div><div><br></div><div>Best,</div><div>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;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 13.07.2022 22:58:12 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 Compiler to project The Inbox:<br>http://source.squeak.org/inbox/Compiler-cmm.480.mcz<br><br>==================== Summary ====================<br><br>Name: Compiler-cmm.480<br>Author: cmm<br>Time: 13 July 2022, 3:58:02.487109 pm<br>UUID: 0af0343b-cf23-427a-8bff-1b45941699dc<br>Ancestors: Compiler-eem.479<br><br>Preserve hand-crafted formatting of comments.<br><br>=============== Diff against Compiler-eem.479 ===============<br><br>Item was changed:<br> ----- Method: ParseNode>>printSingleComment:on:indent: (in category 'private') -----<br> printSingleComment: aString on: aStream indent: indent <br>+ "Preserve hand-crafted formatting of comments."<br>+ aStream nextPutAll: aString!<br>- "Print the comment string, assuming it has been indented indent tabs.<br>- Break the string at word breaks, given the widths in the default<br>- font, at 450 points."<br>- <br>- | readStream word position lineBreak font wordWidth tabWidth spaceWidth lastChar |<br>- readStream := ReadStream on: aString.<br>- font := TextStyle default defaultFont.<br>- tabWidth := TextStyle default tabWidth.<br>- spaceWidth := font widthOf: Character space.<br>- position := indent * tabWidth.<br>- lineBreak := 450.<br>- [readStream atEnd]<br>- whileFalse: <br>- [word := self nextWordFrom: readStream setCharacter: [:lc | lastChar := lc].<br>- wordWidth := word inject: 0 into: [:width :char | width + (font widthOf: char)].<br>- position := position + wordWidth.<br>- position > lineBreak<br>- ifTrue: <br>- [aStream skip: -1; crtab: indent.<br>- position := indent * tabWidth + wordWidth + spaceWidth.<br>- lastChar = Character cr<br>- ifTrue: [[readStream peekFor: Character tab] whileTrue].<br>- word isEmpty ifFalse: [aStream nextPutAll: word; space]]<br>- ifFalse: <br>- [aStream nextPutAll: word.<br>- readStream atEnd<br>- ifFalse: <br>- [position := position + spaceWidth.<br>- aStream space].<br>- lastChar = Character cr<br>- ifTrue: <br>- [aStream skip: -1; crtab: indent.<br>- position := indent * tabWidth.<br>- [readStream peekFor: Character tab] whileTrue]]]!<br><br><br></div></blockquote></div>