From 1d58ab89ca6eb1f87a812e23ffca210e15c4fb5f Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Tue, 5 Aug 2014 10:04:38 +0400 Subject: [PATCH] Fix bug with uninitialized undo list of an indirect buffer (Bug#18180). * buffer.c (Fmake_indirect_buffer): Initialize undo list with the base buffer's undo list. --- src/ChangeLog | 6 ++++++ src/buffer.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 3f9b4577460..de56e3501d8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-08-05 Dmitry Antipov + + Fix bug with uninitialized undo list of an indirect buffer (Bug#18180). + * buffer.c (Fmake_indirect_buffer): Initialize undo list with the + base buffer's undo list. + 2014-08-03 Dmitry Antipov Fix bug with an attempt to select uninitialized frame (Bug#18161). diff --git a/src/buffer.c b/src/buffer.c index 8077e47fa0b..495f937d83f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -809,6 +809,9 @@ CLONE nil means the indirect buffer's state is reset to default values. */) set_string_intervals (name, NULL); bset_name (b, name); + /* An indirect buffer shares undo list of its base (Bug#18180). */ + bset_undo_list (b, BVAR (b->base_buffer, undo_list)); + reset_buffer (b); reset_buffer_local_variables (b, 1); -- 2.39.5