Not checking whether a function has a help line; it's irrelevant.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5392 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2015-11-06 20:25:05 +00:00
parent 4ede3b494f
commit 53fbcf77f2
3 changed files with 4 additions and 9 deletions

View File

@ -2,6 +2,9 @@
* src/files.c (write_lockfile): Don't bail out when the hostname is
overlong, but instead truncate it properly and continue. This fixes
Ubuntu bug #1509081 reported by Sam Reed.
* src/global.c (length_of_list), src/winio.c(get_mouseinput): Don't
check whether a function has a help line, since all of them have.
(And even if some didn't, they would still be valid functions.)
2015-11-02 Benno Schulenberg <bensberg@justemail.net>
* src/nano.h: Delete an unused type definition.

View File

@ -217,11 +217,7 @@ size_t length_of_list(int menu)
size_t i = 0;
for (f = allfuncs; f != NULL; f = f->next)
if ((f->menus & menu) != 0
#ifndef DISABLE_HELP
&& strlen(f->help) > 0
#endif
) {
if ((f->menus & menu) != 0) {
i++;
}
return i;

View File

@ -1684,10 +1684,6 @@ int get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts)
for (f = allfuncs; f != NULL; f = f->next) {
if ((f->menus & currmenu) == 0)
continue;
#ifndef DISABLE_HELP
if (!f->help || strlen(f->help) == 0)
continue;
#endif
if (first_sc_for(currmenu, f->scfunc) == NULL)
continue;
/* Tick off an actually shown shortcut. */