From 3bd960692218b3dedc64dac44cc0777b8eb24782 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 1 Oct 2022 17:56:58 +0300 Subject: [PATCH] ; Another fix for vertical motion * src/xdisp.c (move_it_vertically_backward): Undo recent changes for bidi-reordered text. (Bug#58210) --- src/xdisp.c | 9 ++------- 1 file 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) /* Estimate how many newlines we must move back. */ nlines = max (1, dy / default_line_pixel_height (it->w)); - /* Move one line more back, for the (rare) situation where we have - bidi-reordered continued lines, and we start from the top-most - screen line, which is the last in logical order. */ - if (it->bidi_p && dy == 0) - nlines++; if (it->line_wrap == TRUNCATE || nchars_per_row == 0) pos_limit = BEGV; else @@ -10776,10 +10771,10 @@ move_it_vertically_backward (struct it *it, int dy) if (dy == 0) { /* DY == 0 means move to the start of the screen line. The - value of nlines is > 1 if continuation lines were involved, + value of nlines is > 0 if continuation lines were involved, or if the original IT position was at start of a line. */ RESTORE_IT (it, it, it2data); - if (nlines > 1) + if (nlines > 0) move_it_by_lines (it, nlines); /* The above code moves us to some position NLINES down, usually to its first glyph (leftmost in an L2R line), but -- 2.39.2