From: Benno Schulenberg Date: Sun, 22 Nov 2015 16:07:23 +0000 (+0000) Subject: Deleting a condition that will never occur. X-Git-Tag: v2.5.0~53 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d6bd276c8c41377769436917abfbfb625a2dce61;p=nano.git Deleting a condition that will never occur. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index c57f5a99..17dfda9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-11-22 Benno Schulenberg + * 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 * 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. diff --git a/src/text.c b/src/text.c index ee43ac1d..16e0a409 100644 --- a/src/text.c +++ b/src/text.c @@ -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;