Opened 13 years ago
Last modified 4 years ago
#8106 assigned bug
BTextView::CountLines() ignores last line if it's empty
Reported by: | bigmike | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Method CountLines() doesn't count the last line in a BTextView if it is empty and it is not the first line. I. e. if there is some text and the last character is a linebreak then CountLines() returns a result that is one too small.
I am not entirely sure, if this is intended behavior, but I guess not.
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 4 years ago
This is still visible in hrev54473 in StyledEdit in the document->stats menu
comment:4 by , 4 years ago
Summary: | BTextView::CountLines() returns wrong result → BTextView::CountLines() ignores last line if it's empty |
---|
Note:
See TracTickets
for help on using tickets.
That's also apparent when using Mail (or rather it was, I might have changed that in the mean time), so in any case, it's different from the BeOS implementation. The only reason I could imagine it is done like this is because of alerts, as the last newline doesn't really make any difference to have (for the layout). But I guess CountLines() should not be used there then, and be changed instead.