Deleting a condition that will never occur.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2015-11-22 16:07:23 +00:00
parent c706b79b63
commit d6bd276c8c
2 changed files with 7 additions and 7 deletions

View File

@ -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> 2015-11-21 Benno Schulenberg <bensberg@justemail.net>
* src/nano.c (main): Let the value of a --fill option on the * 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. command line override the value of a "set fill" in an rcfile.

View File

@ -1022,13 +1022,9 @@ void add_undo(undo_type action)
} }
break; break;
case PASTE: case PASTE:
if (!cutbuffer)
statusbar(_("Internal error: cannot set up uncut. Please save your work."));
else {
u->cutbuffer = copy_filestruct(cutbuffer); u->cutbuffer = copy_filestruct(cutbuffer);
u->lineno += cutbottom->lineno - cutbuffer->lineno; u->lineno += cutbottom->lineno - cutbuffer->lineno;
u->mark_set = TRUE; u->mark_set = TRUE;
}
break; break;
case ENTER: case ENTER:
break; break;