Fix double accounting of padding master
authorThomas White <taw@physics.org>
Sun, 26 Jan 2020 15:13:30 +0000 (16:13 +0100)
committerThomas White <taw@physics.org>
Sun, 26 Jan 2020 15:13:30 +0000 (16:13 +0100)
libstorycode/gtk/gtkslideview.c

index 083d732..b555307 100644 (file)
@@ -594,8 +594,8 @@ static int gtksv_find_cursor(SlideItem *item, Stylesheet *stylesheet,
        pos->para = i-1;
 
        pango_layout_xy_to_index(item->paras[i-1].layout,
-                                pango_units_from_double(x - padl),
-                                pango_units_from_double(y - top - padt),
+                                pango_units_from_double(x),
+                                pango_units_from_double(y - top),
                                 &pos->pos, &pos->trail);
        return 0;
 }