commit a2fea9928daeb7e5a07c6c3e4142ff9ab2d973d6
parent c64f506933f239bbae31b8bbc0179a3eaa6cbc11
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 28 Jan 2020 10:33:56 +0100
build: exclude option '-g' when configured without browser and help
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1819,7 +1819,7 @@ int main(int argc, char **argv)
#ifdef ENABLE_NANORC
{"rcfile", 1, NULL, 'f'},
#endif
-#ifdef ENABLE_BROWSER
+#if defined(ENABLE_BROWSER) || defined(ENABLE_HELP)
{"showcursor", 0, NULL, 'g'},
#endif
{"help", 0, NULL, 'h'},
@@ -2070,9 +2070,11 @@ int main(int argc, char **argv)
custom_nanorc = mallocstrcpy(custom_nanorc, optarg);
break;
#endif
+#if defined(ENABLE_BROWSER) || defined(ENABLE_HELP)
case 'g':
SET(SHOW_CURSOR);
break;
+#endif
case 'h':
usage();
exit(0);