Opened 9 years ago

Last modified 3 years ago

#8106 assigned bug

BTextView::CountLines() returns wrong result

Reported by: bigmike Owned by: nobody
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


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 (2)

comment:1 by axeld, 9 years ago

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.

comment:2 by axeld, 3 years ago

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.