nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 43c6bc6619d70c144429dd50bbbef2eedf7ac1f1
parent e0fab690cccb15ba40e4c08795aa4b452e3dc659
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 17 Mar 2019 19:46:40 +0100

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.

Diffstat:
Msrc/text.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/text.c b/src/text.c @@ -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) {