]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid assertion violations in displaying under 'outline-minor-mode'
authorEli Zaretskii <eliz@gnu.org>
Sat, 25 May 2024 11:23:43 +0000 (14:23 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 26 May 2024 05:57:35 +0000 (07:57 +0200)
* src/xdisp.c (init_from_display_pos): Initialize BYTEPOS
correctly, since 'init_iterator' no longer computes it from
CHARPOS as needed.  This fixes a change made on Mar 13, 2013.
(Bug#71194)

(cherry picked from commit 4f0121f8dbe2ca0ec8fe2831353f01782e5e6b9d)

src/xdisp.c

index ba5af7127c68eae0a5b57b215c1a5ab1c3c0f3e4..7a00b297d61ba777760a4679d4fcfb37710097c9 100644 (file)
@@ -3878,7 +3878,7 @@ init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos)
   if (in_ellipses_for_invisible_text_p (pos, w))
     {
       --charpos;
-      bytepos = 0;
+      bytepos = BYTE_TO_CHAR (charpos);
     }
 
   /* Keep in mind: the call to reseat in init_iterator skips invisible