aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-07-23 11:14:58 +0400
committerDmitry Antipov2012-07-23 11:14:58 +0400
commit372f8ffc2eaea40d98a15242482a8c771de70dd4 (patch)
tree75bcf429d98bd7a9ee63610f2c81db89f59266d3 /src
parentb525fd8ad68229ed9b821d7b0e374afaf311165d (diff)
downloademacs-372f8ffc2eaea40d98a15242482a8c771de70dd4.tar.gz
emacs-372f8ffc2eaea40d98a15242482a8c771de70dd4.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/buffer.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b89bfc41298..bc486a99bd4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Swap buffer text indirection counters in Fbuffer_swap_text.
4 * buffer.c (Fbuffer_swap_text): Swap indirections too.
5 This avoids crash reported by Christoph Scholtes at
6 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
7
12012-07-22 Jan Djärv <jan.h.d@swipnet.se> 82012-07-22 Jan Djärv <jan.h.d@swipnet.se>
2 9
3 * nsmenu.m (Popdown_data): New struct. 10 * 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,
2145 swapfield (zv_byte, ptrdiff_t); 2145 swapfield (zv_byte, ptrdiff_t);
2146 eassert (!current_buffer->base_buffer); 2146 eassert (!current_buffer->base_buffer);
2147 eassert (!other_buffer->base_buffer); 2147 eassert (!other_buffer->base_buffer);
2148 swapfield (indirections, ptrdiff_t);
2148 current_buffer->clip_changed = 1; other_buffer->clip_changed = 1; 2149 current_buffer->clip_changed = 1; other_buffer->clip_changed = 1;
2149 swapfield (newline_cache, struct region_cache *); 2150 swapfield (newline_cache, struct region_cache *);
2150 swapfield (width_run_cache, struct region_cache *); 2151 swapfield (width_run_cache, struct region_cache *);