build: exclude option '-g' when configured without browser and help

master
Benno Schulenberg 2020-01-28 10:33:56 +01:00
parent c64f506933
commit a2fea9928d
1 changed files with 3 additions and 1 deletions

View File

@ -1819,7 +1819,7 @@ int main(int argc, char **argv)
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
{"rcfile", 1, NULL, 'f'}, {"rcfile", 1, NULL, 'f'},
#endif #endif
#ifdef ENABLE_BROWSER #if defined(ENABLE_BROWSER) || defined(ENABLE_HELP)
{"showcursor", 0, NULL, 'g'}, {"showcursor", 0, NULL, 'g'},
#endif #endif
{"help", 0, NULL, 'h'}, {"help", 0, NULL, 'h'},
@ -2070,9 +2070,11 @@ int main(int argc, char **argv)
custom_nanorc = mallocstrcpy(custom_nanorc, optarg); custom_nanorc = mallocstrcpy(custom_nanorc, optarg);
break; break;
#endif #endif
#if defined(ENABLE_BROWSER) || defined(ENABLE_HELP)
case 'g': case 'g':
SET(SHOW_CURSOR); SET(SHOW_CURSOR);
break; break;
#endif
case 'h': case 'h':
usage(); usage();
exit(0); exit(0);