]> git.wh0rd.org Git - nano.git/commitdiff
Preventing a chain of editing actions from continuing after a discard.
authorBenno Schulenberg <bensberg@justemail.net>
Wed, 10 Feb 2016 08:49:23 +0000 (08:49 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Wed, 10 Feb 2016 08:49:23 +0000 (08:49 +0000)
This fixes Savannah bug #47104.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5623 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/text.c

index 4dce93fa653843f1ec0c112b870fc450304a3444..65a4411e28f0bf87eef4d565a6eef9525ed42e3f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-02-10  Benno Schulenberg  <bensberg@justemail.net>
+       * 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  <bensberg@justemail.net>
        * src/files.c (stat_with_alloc, open_buffer, write_file): Check the
        result of a stat() to avoid referencing unitialized data.  Original
index 8c6601aea6219924f18ecb53493d91949eee876d..b1cff4822df6d53eb2baa026a702ec7df35679b6 100644 (file)
@@ -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. */