emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 6075ea0b79: Fix 'make_lispy_position' when there's an image at


From: Eli Zaretskii
Subject: emacs-28 6075ea0b79: Fix 'make_lispy_position' when there's an image at EOB
Date: Wed, 26 Jan 2022 09:46:03 -0500 (EST)

branch: emacs-28
commit 6075ea0b79922765df29ac148ac3a1fbb236ed94
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix 'make_lispy_position' when there's an image at EOB
    
    * src/xdisp.c (move_it_to): Don't compare IT_CHARPOS with an
    invalid TO_CHARPOS.  (Bug#53546)
---
 src/xdisp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 73edc0d7aa..aa70b933f1 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10016,7 +10016,8 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int 
to_x, int to_y, int to_vpos
                         could have both positions after TO_CHARPOS or
                         both positions before it, due to bidi
                         reordering.)  */
-                     if (IT_CHARPOS (*it) != to_charpos
+                     if (to_charpos > 0
+                         && IT_CHARPOS (*it) != to_charpos
                          && ((IT_CHARPOS (it_backup) > to_charpos)
                              == (IT_CHARPOS (*it) > to_charpos)))
                        {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]