From 6095ff3d39be0b21168e8e2680d2a597e44a60c2 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 6 Jul 2015 19:17:27 +0000 Subject: [PATCH] Adjusting whitespace and bracings after the previous changes. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5286 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 2 ++ src/help.c | 14 ++++++-------- src/text.c | 20 +++++++++----------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e399bf3..efcca7c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ the end-of-file to a less frequently travelled path. * src/text.c (do_deletion): If a Backspace happens at the end-of-file, don't remove and then re-add the magic line; just add an undo item. + * src/help.c (help_init), src/text.c (do_undo): Adjust whitespace and + bracing after the previous changes. GNU nano 2.4.2 - 2015.07.05 2015-06-28 Benno Schulenberg diff --git a/src/help.c b/src/help.c index 1d4d758c..098d33d9 100644 --- a/src/help.c +++ b/src/help.c @@ -448,22 +448,20 @@ void help_init(void) int maximum = 0, counter = 0; /* First see how many toggles there are. */ - for (s = sclist; s != NULL; s = s->next) { + for (s = sclist; s != NULL; s = s->next) maximum = (s->toggle && s->ordinal > maximum) ? s->ordinal : maximum; - } /* Now show them in the original order. */ while (counter < maximum) { counter++; - for (s = sclist; s != NULL; s = s->next) { + for (s = sclist; s != NULL; s = s->next) if (s->toggle && s->ordinal == counter) { - ptr += sprintf(ptr, "%s\t\t%s %s\n", (s->menu == MMAIN ? s->keystr : ""), + ptr += sprintf(ptr, "%s\t\t%s %s\n", (s->menu == MMAIN ? s->keystr : ""), _(flagtostr(s->toggle)), _("enable/disable")); - if (s->toggle == NO_COLOR_SYNTAX || s->toggle == TABS_TO_SPACES) - ptr += sprintf(ptr, "\n"); + if (s->toggle == NO_COLOR_SYNTAX || s->toggle == TABS_TO_SPACES) + ptr += sprintf(ptr, "\n"); break; - } - } + } } } diff --git a/src/text.c b/src/text.c index 7fc19761..97e39be3 100644 --- a/src/text.c +++ b/src/text.c @@ -502,17 +502,15 @@ void do_undo(void) goto_line_posx(openfile->filebot->lineno, 0); break; } - {/*FIXME: unindent*/ - t = make_new_node(f); - t->data = mallocstrcpy(NULL, u->strdata); - data = mallocstrncpy(NULL, f->data, u->mark_begin_x + 1); - data[u->mark_begin_x] = '\0'; - free(f->data); - f->data = data; - splice_node(f, t, f->next); - if (f == openfile->filebot) - openfile->filebot = t; - } + t = make_new_node(f); + t->data = mallocstrcpy(NULL, u->strdata); + data = mallocstrncpy(NULL, f->data, u->mark_begin_x + 1); + data[u->mark_begin_x] = '\0'; + free(f->data); + f->data = data; + splice_node(f, t, f->next); + if (f == openfile->filebot) + openfile->filebot = t; goto_line_posx(u->lineno, u->begin); break; case CUT_EOF: -- 2.39.5