Chopping the now unused parameter 'undoing'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5401 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
f1d9fcc77b
commit
54c2f6b5ae
|
@ -3,6 +3,7 @@
|
||||||
undo data, instead of running do_enter() again, because the latter
|
undo data, instead of running do_enter() again, because the latter
|
||||||
will behave differently depending on the setting of autoindent.
|
will behave differently depending on the setting of autoindent.
|
||||||
This addresses Debian bug #793053 reported by Clancy.
|
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>
|
2015-11-10 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/winio.c (edit_draw): Skip a zero-length match only when there
|
* src/winio.c (edit_draw): Skip a zero-length match only when there
|
||||||
|
|
|
@ -2010,7 +2010,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
|
||||||
output[i] = '\n';
|
output[i] = '\n';
|
||||||
/* Newline to Enter, if needed. */
|
/* Newline to Enter, if needed. */
|
||||||
else if (output[i] == '\n') {
|
else if (output[i] == '\n') {
|
||||||
do_enter(FALSE);
|
do_enter();
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -658,7 +658,7 @@ void do_unindent(void);
|
||||||
void do_undo(void);
|
void do_undo(void);
|
||||||
void do_redo(void);
|
void do_redo(void);
|
||||||
#endif
|
#endif
|
||||||
void do_enter(bool undoing);
|
void do_enter(void);
|
||||||
void do_enter_void(void);
|
void do_enter_void(void);
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
RETSIGTYPE cancel_command(int signal);
|
RETSIGTYPE cancel_command(int signal);
|
||||||
|
|
14
src/text.c
14
src/text.c
|
@ -756,7 +756,7 @@ void do_redo(void)
|
||||||
#endif /* !NANO_TINY */
|
#endif /* !NANO_TINY */
|
||||||
|
|
||||||
/* Someone hits Enter *gasp!* */
|
/* Someone hits Enter *gasp!* */
|
||||||
void do_enter(bool undoing)
|
void do_enter()
|
||||||
{
|
{
|
||||||
filestruct *newnode = make_new_node(openfile->current);
|
filestruct *newnode = make_new_node(openfile->current);
|
||||||
size_t extra = 0;
|
size_t extra = 0;
|
||||||
|
@ -764,9 +764,6 @@ void do_enter(bool undoing)
|
||||||
assert(openfile->current != NULL && openfile->current->data != NULL);
|
assert(openfile->current != NULL && openfile->current->data != NULL);
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (!undoing)
|
|
||||||
add_undo(ENTER);
|
|
||||||
|
|
||||||
/* Do auto-indenting, like the neolithic Turbo Pascal editor. */
|
/* Do auto-indenting, like the neolithic Turbo Pascal editor. */
|
||||||
if (ISSET(AUTOINDENT)) {
|
if (ISSET(AUTOINDENT)) {
|
||||||
/* If we are breaking the line in the indentation, the new
|
/* If we are breaking the line in the indentation, the new
|
||||||
|
@ -809,18 +806,13 @@ void do_enter(bool undoing)
|
||||||
|
|
||||||
openfile->placewewant = xplustabs();
|
openfile->placewewant = xplustabs();
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
|
||||||
if (!undoing)
|
|
||||||
update_undo(ENTER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
edit_refresh_needed = TRUE;
|
edit_refresh_needed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Need this again... */
|
/* Need this again... */
|
||||||
void do_enter_void(void)
|
void do_enter_void(void)
|
||||||
{
|
{
|
||||||
do_enter(FALSE);
|
do_enter();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
|
@ -1314,7 +1306,7 @@ bool do_wrap(filestruct *line)
|
||||||
|
|
||||||
/* Go to the wrap location and split the line there. */
|
/* Go to the wrap location and split the line there. */
|
||||||
openfile->current_x = wrap_loc;
|
openfile->current_x = wrap_loc;
|
||||||
do_enter(FALSE);
|
do_enter();
|
||||||
|
|
||||||
if (old_x < wrap_loc) {
|
if (old_x < wrap_loc) {
|
||||||
openfile->current_x = old_x;
|
openfile->current_x = old_x;
|
||||||
|
|
Loading…
Reference in New Issue