Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000397 [tweak] minor always 10-15-04 22:33 10-15-04 22:33
Reporter riks View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Product Build
Summary 0000397: CTextParagraphEditor inaccurately reports visible lines
Description It at least omits the top line
Steps To Reproduce
Additional Information To reproduce:
open a TextEditor
type '1
2'
Open inspector. (self editor visibleLines) printIt
Observe #(a TextLine 3 to: 3)
type <return> after the 2, or before the 1 and reobserve.

Quick-guess work-around fix:
updateParagraphExtent
    | rightX |
    paragraph ifNil:[paragraph := CTextParagraph new].
    rightX := (self textBounds insetBy: inset) extent x.
    (self wrapContents) ifTrue:[
        paragraph
            compose: text
            style: paragraph textStyle
            from: 1
            in: (0@1 extent: rightX @ 999999999).
    ] ifFalse:[
        paragraph
            compose: text
            style: paragraph textStyle
            from: 1
            in: (0@1 extent: 999999999 @ 999999999).
        paragraph adjustRightXBy: 999999999 - paragraph width.
    ].
Then I see results #(a TextLine 1 to: 2 a TextLine 3 to: 3)
which is as expected
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
10-15-04 22:33 riks New Issue


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
27 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker