Page MenuHome

Fix early clipping of last visible line in textview

Authored by Campbell Barton (campbellbarton) on Oct 26 2014, 11:41 PM.



The old behavior was to skip drawing of the last visible line in a textview if it was partially occluded. This patch fixes that.

y_next is the baseline for the next line to draw
cdc->lheight is the line height
cdc->ymin is the lower bound of the textview

The last visible line can extend up to y_next, so it would be wrong to skip drawing the line if "y_next - cdc->lheight < cdc->ymin" is true.

Diff Detail