summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-03-17 18:15:32 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-03-17 18:15:32 +0000
commitff600fbf8c08adf3b98869fab89529cc005b493c (patch)
tree913f2a9cc370f7df6565af6ba7b453f1b94b0948 /render
parent55afb9a64a40b6aabb3d8d84932b3806fd4b07da (diff)
downloadnetsurf-ff600fbf8c08adf3b98869fab89529cc005b493c.tar.gz
netsurf-ff600fbf8c08adf3b98869fab89529cc005b493c.tar.bz2
Fix text/plain rendering's plot range calc to take account of vertical plot offset (y).
svn path=/trunk/netsurf/; revision=12097
Diffstat (limited to 'render')
-rw-r--r--render/textplain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/render/textplain.c b/render/textplain.c
index 61b423cdb..8514b43ef 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -557,8 +557,8 @@ bool textplain_redraw(struct content *c, int x, int y,
unsigned long line_count = c->data.textplain.physical_line_count;
float line_height = textplain_line_height();
float scaled_line_height = line_height * scale;
- long line0 = clip->y0 / scaled_line_height - 1;
- long line1 = clip->y1 / scaled_line_height + 1;
+ long line0 = (clip->y0 - y) / scaled_line_height - 1;
+ long line1 = (clip->y1 - y) / scaled_line_height + 1;
struct textplain_line *line = c->data.textplain.physical_line;
size_t length;
plot_style_t *plot_style_highlight;