From: Benno Schulenberg Date: Wed, 10 Feb 2016 08:49:23 +0000 (+0000) Subject: Preventing a chain of editing actions from continuing after a discard. X-Git-Tag: v2.5.2~12 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ef2cfa31a79ab138e27128fe6870465d913454fd;p=nano.git Preventing a chain of editing actions from continuing after a discard. This fixes Savannah bug #47104. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5623 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 4dce93fa..65a4411e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-02-10 Benno Schulenberg + * src/text.c (discard_until): Prevent a chain of editing actions from + continuing after a discard. This fixes Savannah bug #47104. + 2016-02-09 Benno Schulenberg * src/files.c (stat_with_alloc, open_buffer, write_file): Check the result of a stat() to avoid referencing unitialized data. Original diff --git a/src/text.c b/src/text.c index 8c6601ae..b1cff482 100644 --- a/src/text.c +++ b/src/text.c @@ -908,6 +908,9 @@ void discard_until(const undo *thisitem, openfilestruct *thefile) free(dropit); dropit = thefile->undotop; } + + /* Prevent a chain of editing actions from continuing. */ + thefile->last_action = OTHER; } /* Add a new undo struct to the top of the current pile. */