From: Eli Zaretskii Date: Sun, 26 Feb 2023 09:34:14 +0000 (+0200) Subject: Fix 'vertical-motion' when display strings are around X-Git-Tag: emacs-29.0.90~316 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5256392a7ec0639ba4ba684d608bb3aaf976c985;p=emacs.git 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) --- 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) {