summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-20 02:07:53 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-20 02:08:46 -0400
commita1b49a7dc93d8e75af600bce27fa4edcc5961513 (patch)
tree2b8cf549112b8cae16915ec11ed03dbbd7e1f0f8
parentee44512da69e479f4af6c69b6113d6974042e6dc (diff)
downloadpango-block-cursor-fixes.tar.gz
layout: Fix some wrapped line start positionsblock-cursor-fixes
Make pango_layout_index_to_pos report non-empty pos for the first position in a wrapped line.
-rw-r--r--pango/pango-layout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 5ae46f85..669410ee 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -2425,7 +2425,8 @@ pango_layout_index_to_pos (PangoLayout *layout,
}
while (pango_layout_iter_next_run (&iter));
- break;
+ if (layout_line->start_index + layout_line->length > index)
+ break;
}
if (!pango_layout_iter_next_line (&iter))