diff --git a/ChangeLog b/ChangeLog index daa57b15630dc9106d55e0f8885731f580da0cd3..8df86a315077039239be791a883b0f97787597e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2015-08-16 Benno Schulenberg <bensberg@justemail.net> * src/help.c (help_init, help_line_len): Avoid wide paragraphs of text in the help screens: wrap them at 74 columns if the screen is wider. + * src/help.c (help_init): Reduce the scope of a variable. 2015-08-13 Benno Schulenberg <bensberg@justemail.net> * src/search.c (do_find_bracket): Remove mistaken comparison between diff --git a/src/help.c b/src/help.c index ee35b1543231a11fe64512936f9a1f5b63df153c..912e6e1e983e302e5fcf961a518f774b58faf68e 100644 --- a/src/help.c +++ b/src/help.c @@ -198,7 +198,6 @@ void help_init(void) char *ptr; const subnfunc *f; const sc *s; - int scsfound = 0; #ifndef NANO_TINY bool old_whitespace = ISSET(WHITESPACE_DISPLAY); @@ -408,12 +407,13 @@ void help_init(void) /* Now add our shortcut info. */ for (f = allfuncs; f != NULL; f = f->next) { + int scsfound = 0; if ((f->menus & currmenu) == 0) continue; /* Let's simply show the first two shortcuts from the list. */ - for (s = sclist, scsfound = 0; s != NULL; s = s->next) { + for (s = sclist; s != NULL; s = s->next) { if ((s->menus & currmenu) == 0) continue;