]> git.eshelyaron.com Git - emacs.git/commitdiff
Swap buffer text indirection counters in Fbuffer_swap_text.
authorDmitry Antipov <dmantipov@yandex.ru>
Mon, 23 Jul 2012 07:14:58 +0000 (11:14 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Mon, 23 Jul 2012 07:14:58 +0000 (11:14 +0400)
* buffer.c (Fbuffer_swap_text): Swap indirections too.
This avoids crash reported by Christoph Scholtes at
http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.

src/ChangeLog
src/buffer.c

index b89bfc412989cda10e8ecc7cfcd6a24a434f5de7..bc486a99bd4db8b2e7aba48f412b18baebd5ba87 100644 (file)
@@ -1,3 +1,10 @@
+2012-07-22  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Swap buffer text indirection counters in Fbuffer_swap_text.
+       * buffer.c (Fbuffer_swap_text): Swap indirections too.
+       This avoids crash reported by Christoph Scholtes at
+       http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
+
 2012-07-22  Jan Djärv  <jan.h.d@swipnet.se>
 
        * nsmenu.m (Popdown_data): New struct.
index 5f9f6a79b6757a121b64ce7a0c85c3b82f6eeeb2..68208d17abedb3f0ccb88540cdf74fb509f96913 100644 (file)
@@ -2145,6 +2145,7 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
   swapfield (zv_byte, ptrdiff_t);
   eassert (!current_buffer->base_buffer);
   eassert (!other_buffer->base_buffer);
+  swapfield (indirections, ptrdiff_t);
   current_buffer->clip_changed = 1;    other_buffer->clip_changed = 1;
   swapfield (newline_cache, struct region_cache *);
   swapfield (width_run_cache, struct region_cache *);