From: Benno Schulenberg Date: Wed, 11 Nov 2015 19:04:31 +0000 (+0000) Subject: Chopping the now unused parameter 'undoing'. X-Git-Tag: v2.5.0~61 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=54c2f6b5aeb8c86125f664640a031a9aef4d8c48;p=nano.git Chopping the now unused parameter 'undoing'. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5401 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 430ca8e1..1bd21b3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ 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 * src/winio.c (edit_draw): Skip a zero-length match only when there diff --git a/src/nano.c b/src/nano.c index 8e50848a..0886eeec 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2010,7 +2010,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) output[i] = '\n'; /* Newline to Enter, if needed. */ else if (output[i] == '\n') { - do_enter(FALSE); + do_enter(); i++; continue; } diff --git a/src/proto.h b/src/proto.h index 09fe8726..1fee0e9a 100644 --- a/src/proto.h +++ b/src/proto.h @@ -658,7 +658,7 @@ void do_unindent(void); 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); diff --git a/src/text.c b/src/text.c index ff9951d7..2e99cc64 100644 --- a/src/text.c +++ b/src/text.c @@ -756,7 +756,7 @@ void do_redo(void) #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; @@ -764,9 +764,6 @@ void do_enter(bool undoing) 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 @@ -809,18 +806,13 @@ void do_enter(bool undoing) 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 @@ -1314,7 +1306,7 @@ bool do_wrap(filestruct *line) /* 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;