From: Dmitry Antipov Date: Mon, 23 Jul 2012 07:14:58 +0000 (+0400) Subject: Swap buffer text indirection counters in Fbuffer_swap_text. X-Git-Tag: emacs-24.2.90~1098 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=372f8ffc2eaea40d98a15242482a8c771de70dd4;p=emacs.git 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index b89bfc41298..bc486a99bd4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2012-07-22 Dmitry Antipov + + 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 * nsmenu.m (Popdown_data): New struct. diff --git a/src/buffer.c b/src/buffer.c index 5f9f6a79b67..68208d17abe 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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 *);