directly on the statusbar instead of as an undid or redid message.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5442
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
occur, instead of silently continuing.
* src/text.c (do_undo): Elide an unneeded variable, and don't skip
the end of this function when things went wrong.
+ * src/text.c (do_undo, do_redo, add_undo, update_undo): Handle more
+ possible internal errors, and do it correctly.
2015-11-24 Benno Schulenberg <bensberg@justemail.net>
* doc/syntax/makefile.nanorc: Also recognize the extensions .make and
f->data = data;
break;
default:
- undidmsg = _("Internal error: unknown type. Please save your work.");
+ statusbar(_("Internal error: unknown type. Please save your work."));
break;
}
u->cutbuffer = NULL;
break;
default:
- redidmsg = _("Internal error: unknown type. Please save your work.");
+ statusbar(_("Internal error: unknown type. Please save your work."));
break;
}
break;
case ENTER:
break;
- case OTHER:
+ default:
statusbar(_("Internal error: unknown type. Please save your work."));
break;
}
#endif
case JOIN:
/* These cases are handled by the earlier check for a new line and action. */
- case OTHER:
+ break;
+ default:
+ statusbar(_("Internal error: unknown type. Please save your work."));
break;
}