tweaks: fold two similar and three identical cases together

master
Benno Schulenberg 2021-01-01 20:24:55 +01:00
parent 90f6f25e31
commit 6a88fe8807
1 changed files with 3 additions and 11 deletions

View File

@ -1077,9 +1077,7 @@ void add_undo(undo_type action, const char *message)
break;
case PASTE:
u->cutbuffer = copy_buffer(cutbuffer);
if (thisline == openfile->filebot)
u->xflags |= INCLUDED_LAST_LINE;
break;
/* Fall-through. */
case INSERT:
if (thisline == openfile->filebot)
u->xflags |= INCLUDED_LAST_LINE;
@ -1219,17 +1217,11 @@ void update_undo(undo_type action)
u->tail_x = strlen(bottomline->data);
}
break;
case PASTE:
u->tail_lineno = openfile->current->lineno;
u->tail_x = openfile->current_x;
break;
case INSERT:
u->tail_lineno = openfile->current->lineno;
u->tail_x = openfile->current_x;
break;
case COUPLE_BEGIN:
break;
case COUPLE_END:
case PASTE:
case INSERT:
u->tail_lineno = openfile->current->lineno;
u->tail_x = openfile->current_x;
break;