summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-04 17:59:53 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-04 18:13:04 -0400
commit1010394a034293dd977e319c413d42b6cf4e9c7e (patch)
tree9cce33fced5fbb66bb6cabb5bd9945a7a9ff111f
parenteeff7bb783e1fd44fd8c54e6be8ace267b4521c9 (diff)
downloadpango-1010394a034293dd977e319c413d42b6cf4e9c7e.tar.gz
Revert a non-longer needed change
This reverts 681f92d78c2623, after adding the crash that it alludes to as a test case and verifying that it no longer crashes. This commit was causing split cursors to not work as intended at the end of a mixed-direction string. Broken since 2008...
-rw-r--r--pango/pango-layout.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 8303be2c..520782c5 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -2466,14 +2466,6 @@ pango_layout_get_cursor_pos (PangoLayout *layout,
else
x1_trailing = line_rect.width;
}
- else if (index >= layout_line->start_index + layout_line->length)
- {
- dir1 = layout_line->resolved_dir;
- if (layout_line->resolved_dir == PANGO_DIRECTION_LTR)
- x1_trailing = line_rect.width;
- else
- x1_trailing = 0;
- }
else
{
gint prev_index = g_utf8_prev_char (layout->text + index) - layout->text;