summaryrefslogtreecommitdiff
path: root/pango/pango-layout.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-03-31 02:19:45 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-03-31 02:19:45 -0400
commitbc00edb9426ddb326b6d6d1cf725cad441b511f2 (patch)
treea09ebb14a6371e3ee12b7a105f009786993f0c6d /pango/pango-layout.c
parent37a427018c92a2bc679ef104097e07a619609c9c (diff)
downloadpango-bc00edb9426ddb326b6d6d1cf725cad441b511f2.tar.gz
Fix move pango_layout_move_cursor_visuallyfix-rtl-cursor-move
When moving the cursor off the paragraph end to the left in RTL text, we were moving to the previous line, and not to the next line, as expected. Test included. Fixes: #679
Diffstat (limited to 'pango/pango-layout.c')
-rw-r--r--pango/pango-layout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index e45fb69f..eb674b50 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -2184,9 +2184,9 @@ pango_layout_move_cursor_visually (PangoLayout *layout,
else
{
if (old_index == line->start_index + line->length && direction < 0)
- off_start = TRUE;
- if (old_index == line->start_index && direction > 0)
off_end = TRUE;
+ if (old_index == line->start_index && direction > 0)
+ off_start = TRUE;
}
if (off_start || off_end)