aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2022-10-01 17:56:58 +0300
committerEli Zaretskii2022-10-01 17:56:58 +0300
commit3bd960692218b3dedc64dac44cc0777b8eb24782 (patch)
tree1b13dbeaf722bc0c404eb55be581e430d07e2259
parente50a3b57921e8b690d3c3adb993e2441d5970116 (diff)
downloademacs-3bd960692218b3dedc64dac44cc0777b8eb24782.tar.gz
emacs-3bd960692218b3dedc64dac44cc0777b8eb24782.zip
; Another fix for vertical motion
* src/xdisp.c (move_it_vertically_backward): Undo recent changes for bidi-reordered text. (Bug#58210)
-rw-r--r--src/xdisp.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index c2e91d54ce1..818cf5e3f8f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10709,11 +10709,6 @@ move_it_vertically_backward (struct it *it, int dy)
10709 10709
10710 /* Estimate how many newlines we must move back. */ 10710 /* Estimate how many newlines we must move back. */
10711 nlines = max (1, dy / default_line_pixel_height (it->w)); 10711 nlines = max (1, dy / default_line_pixel_height (it->w));
10712 /* Move one line more back, for the (rare) situation where we have
10713 bidi-reordered continued lines, and we start from the top-most
10714 screen line, which is the last in logical order. */
10715 if (it->bidi_p && dy == 0)
10716 nlines++;
10717 if (it->line_wrap == TRUNCATE || nchars_per_row == 0) 10712 if (it->line_wrap == TRUNCATE || nchars_per_row == 0)
10718 pos_limit = BEGV; 10713 pos_limit = BEGV;
10719 else 10714 else
@@ -10776,10 +10771,10 @@ move_it_vertically_backward (struct it *it, int dy)
10776 if (dy == 0) 10771 if (dy == 0)
10777 { 10772 {
10778 /* DY == 0 means move to the start of the screen line. The 10773 /* DY == 0 means move to the start of the screen line. The
10779 value of nlines is > 1 if continuation lines were involved, 10774 value of nlines is > 0 if continuation lines were involved,
10780 or if the original IT position was at start of a line. */ 10775 or if the original IT position was at start of a line. */
10781 RESTORE_IT (it, it, it2data); 10776 RESTORE_IT (it, it, it2data);
10782 if (nlines > 1) 10777 if (nlines > 0)
10783 move_it_by_lines (it, nlines); 10778 move_it_by_lines (it, nlines);
10784 /* The above code moves us to some position NLINES down, 10779 /* The above code moves us to some position NLINES down,
10785 usually to its first glyph (leftmost in an L2R line), but 10780 usually to its first glyph (leftmost in an L2R line), but