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:
parent
e0fab690cc
commit
43c6bc6619
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user