undo data, instead of running do_enter() again, because the latter
will behave differently depending on the setting of autoindent.
This addresses Debian bug #793053 reported by Clancy.
+ * src/text.c (do_enter): Chop the now unused parameter 'undoing'.
2015-11-10 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (edit_draw): Skip a zero-length match only when there
void do_undo(void);
void do_redo(void);
#endif
-void do_enter(bool undoing);
+void do_enter(void);
void do_enter_void(void);
#ifndef NANO_TINY
RETSIGTYPE cancel_command(int signal);
#endif /* !NANO_TINY */
/* Someone hits Enter *gasp!* */
-void do_enter(bool undoing)
+void do_enter()
{
filestruct *newnode = make_new_node(openfile->current);
size_t extra = 0;
assert(openfile->current != NULL && openfile->current->data != NULL);
#ifndef NANO_TINY
- if (!undoing)
- add_undo(ENTER);
-
/* Do auto-indenting, like the neolithic Turbo Pascal editor. */
if (ISSET(AUTOINDENT)) {
/* If we are breaking the line in the indentation, the new
openfile->placewewant = xplustabs();
-#ifndef NANO_TINY
- if (!undoing)
- update_undo(ENTER);
-#endif
-
edit_refresh_needed = TRUE;
}
/* Need this again... */
void do_enter_void(void)
{
- do_enter(FALSE);
+ do_enter();
}
#ifndef NANO_TINY
/* Go to the wrap location and split the line there. */
openfile->current_x = wrap_loc;
- do_enter(FALSE);
+ do_enter();
if (old_x < wrap_loc) {
openfile->current_x = old_x;