[pango/fix-split-cursors-at-end: 2/3] Revert a non-longer needed change




commit 1010394a034293dd977e319c413d42b6cf4e9c7e
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Aug 4 17:59:53 2021 -0400

    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...

 pango/pango-layout.c | 8 --------
 1 file changed, 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]