]> git.wh0rd.org Git - nano.git/commitdiff
Deleting a condition that will never occur.
authorBenno Schulenberg <bensberg@justemail.net>
Sun, 22 Nov 2015 16:07:23 +0000 (16:07 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Sun, 22 Nov 2015 16:07:23 +0000 (16:07 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/text.c

index c57f5a99453186b75a57bcf33015f055b4af7867..17dfda9e19af601e2c343992ae320b87a08a9afc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-11-22  Benno Schulenberg  <bensberg@justemail.net>
+       * src/text.c (add_undo): Delete a condition that will never occur --
+       this function is only ever called with PASTE when cutbuffer != NULL.
+
 2015-11-21  Benno Schulenberg  <bensberg@justemail.net>
        * src/nano.c (main): Let the value of a --fill option on the
        command line override the value of a "set fill" in an rcfile.
index ee43ac1dce8926163646863ce856fadefcbc7942..16e0a409ca0b6fac0b2e39d2c318f0ebc869c1a7 100644 (file)
@@ -1022,13 +1022,9 @@ void add_undo(undo_type action)
        }
        break;
     case PASTE:
-       if (!cutbuffer)
-           statusbar(_("Internal error: cannot set up uncut.  Please save your work."));
-       else {
-           u->cutbuffer = copy_filestruct(cutbuffer);
-           u->lineno += cutbottom->lineno - cutbuffer->lineno;
-           u->mark_set = TRUE;
-       }
+       u->cutbuffer = copy_filestruct(cutbuffer);
+       u->lineno += cutbottom->lineno - cutbuffer->lineno;
+       u->mark_set = TRUE;
        break;
     case ENTER:
        break;