tweaks: add a consistency check plus a corresponding warning

Since commit 4c6ec637 from about half a year ago, the 'action' parameter
of update_undo() is unused.  Verify that this parameter matches the type
of the item at the top of the undo stack, so that in another half year
the parameter can be safely removed.
This commit is contained in:
Benno Schulenberg 2019-03-17 19:46:40 +01:00
parent e0fab690cc
commit 43c6bc6619

View File

@ -1313,6 +1313,9 @@ void update_undo(undo_type action)
char *char_buf;
int char_len;
if (u->type != action)
statusline(ALERT, "Mismatching undo type -- please report a bug");
u->newsize = openfile->totsize;
switch (u->type) {