aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-09-23 10:19:04 +0200
committerThomas White <taw@bitwiz.org.uk>2014-09-23 10:19:04 +0200
commit7e2b280ac606cf69461df4da7aea3973b80cbabb (patch)
tree88feead22dca7b031f4f541c27628e36525ec6db
parent702724c9e7ea8222eba9633be3ff83383a075db2 (diff)
Take padding into account for cursor position
-rw-r--r--src/mainwindow.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c
index b9c9823..63b29c0 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -874,6 +874,8 @@ static void draw_caret(cairo_t *cr, struct frame *fr,
/* Locate the cursor in a "logical" and "geographical" sense */
box = &fr->lines[cursor_line].boxes[cursor_box];
get_cursor_pos(box, cursor_pos, &xposd, &yposd, &line_height);
+ xposd += fr->pad_l;
+ yposd += fr->pad_t;
for ( i=0; i<cursor_line; i++ ) {
yposd += pango_units_to_double(fr->lines[i].height);