From 5256392a7ec0639ba4ba684d608bb3aaf976c985 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 26 Feb 2023 11:34:14 +0200 Subject: [PATCH] Fix 'vertical-motion' when display strings are around * src/indent.c (Fvertical_motion): Correct bidi-related condition for character position, when we didn't move vertically. (Bug#61636) --- src/indent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/indent.c b/src/indent.c index 6de18d749ca..08d2bf5ea28 100644 --- a/src/indent.c +++ b/src/indent.c @@ -2401,7 +2401,7 @@ whether or not it is currently displayed in some window. */) last line that it occupies. */ if (it_start < ZV) { - if ((it.bidi_it.scan_dir > 0) + if ((it.bidi_it.scan_dir >= 0 || it.vpos == vpos_init) ? IT_CHARPOS (it) < it_start : IT_CHARPOS (it) > it_start) { -- 2.39.5