diff options
author | Jeremy Bicha <jbicha@ubuntu.com> | 2022-04-01 19:08:05 +0100 |
---|---|---|
committer | Jeremy Bicha <jbicha@ubuntu.com> | 2022-04-01 19:08:05 +0100 |
commit | 9803dad955b0f5b312a9c6e6e0ce199be7d033c5 (patch) | |
tree | cc861690bb7544c00e29e2f2e138a28e023f6ed3 | |
parent | bc7fae62ec7611805f573972064b758a666dac85 (diff) | |
parent | c8644f137e880d6e1c5fb7ccbd77191f16cf2195 (diff) |
Record pango1.0 (1.50.6+ds-2) in archive suite sid
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/patches/Fix-move-pango_layout_move_cursor_visually.patch | 54 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | pango/pango-layout.c | 4 | ||||
-rw-r--r-- | tests/test-bidi.c | 3 |
5 files changed, 65 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index 9eebc8a4..1fa48ea3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pango1.0 (1.50.6+ds-2) unstable; urgency=medium + + * Cherry-pick patch to fix RTL navigation between lines (LP: #1966613) + + -- Jeremy Bicha <jbicha@ubuntu.com> Fri, 01 Apr 2022 14:08:05 -0400 + pango1.0 (1.50.6+ds-1) unstable; urgency=medium * Team upload diff --git a/debian/patches/Fix-move-pango_layout_move_cursor_visually.patch b/debian/patches/Fix-move-pango_layout_move_cursor_visually.patch new file mode 100644 index 00000000..aadd0d08 --- /dev/null +++ b/debian/patches/Fix-move-pango_layout_move_cursor_visually.patch @@ -0,0 +1,54 @@ +From: Matthias Clasen <mclasen@redhat.com> +Date: Thu, 31 Mar 2022 02:19:45 -0400 +Subject: Fix move pango_layout_move_cursor_visually + +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 +(cherry picked from commit bc00edb9426ddb326b6d6d1cf725cad441b511f2) +--- + pango/pango-layout.c | 4 ++-- + tests/test-bidi.c | 3 ++- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/pango/pango-layout.c b/pango/pango-layout.c +index e45fb69..eb674b5 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) +diff --git a/tests/test-bidi.c b/tests/test-bidi.c +index eb99abb..ba578ba 100644 +--- a/tests/test-bidi.c ++++ b/tests/test-bidi.c +@@ -348,6 +348,7 @@ test_move_cursor_para (void) + { "line 1
line 2
line 3\nline 4\r\nline 5", -1 }, // various separators + { "some text, some more text,\n\n even more text", 60 }, + { "long word", 40 }, ++ { "זוהי השורה הראשונה" "\n" "זוהי השורה השנייה" "\n" "זוהי השורה השלישית" , 200 }, + }; + PangoLayout *layout; + PangoRectangle pos, old_pos; +@@ -399,7 +400,7 @@ test_move_cursor_para (void) + break; + + if (index >= strlen (tests[i].text) - 1) +- break; ++ continue; + + pango_layout_get_cursor_pos (layout, index, &pos, NULL); + diff --git a/debian/patches/series b/debian/patches/series index 984d5b48..762b8fdc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ gi-docgen/Disable-web-fonts-for-now.patch gi-docgen/templates-Remove-html5shiv.patch debian/tests-Skip-a-test-that-fails-with-a-small-variation-on-i3.patch +Fix-move-pango_layout_move_cursor_visually.patch 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) diff --git a/tests/test-bidi.c b/tests/test-bidi.c index eb99abbf..ba578ba8 100644 --- a/tests/test-bidi.c +++ b/tests/test-bidi.c @@ -348,6 +348,7 @@ test_move_cursor_para (void) { "line 1
line 2
line 3\nline 4\r\nline 5", -1 }, // various separators { "some text, some more text,\n\n even more text", 60 }, { "long word", 40 }, + { "זוהי השורה הראשונה" "\n" "זוהי השורה השנייה" "\n" "זוהי השורה השלישית" , 200 }, }; PangoLayout *layout; PangoRectangle pos, old_pos; @@ -399,7 +400,7 @@ test_move_cursor_para (void) break; if (index >= strlen (tests[i].text) - 1) - break; + continue; pango_layout_get_cursor_pos (layout, index, &pos, NULL); |