From 5aa39834aaf9f6a80d10ec423d1acfa2375d80e3 Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 5 May 2004 21:36:50 +0000
Subject: [PATCH] disable "Where Is Next" in tiny mode

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1727 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog    | 1 +
 src/global.c | 4 +++-
 src/proto.h  | 2 ++
 src/search.c | 2 ++
 4 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index ba9ce9d7..5c323c89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,7 @@ CVS code -
 	  instead of inside the disabled functions. (David Benbennick)
 	- Clarifications to comments explaining exactly what control
 	  characters and escape sequences are supported. (DLR)
+	- Disable "Where Is Next" in tiny mode. (DLR)
 - files.c:
   add_open_file()
 	- Rearrange the NANO_SMALL #ifdef so that the code to set the
diff --git a/src/global.c b/src/global.c
index 636f96e7..3b1a0fa2 100644
--- a/src/global.c
+++ b/src/global.c
@@ -622,7 +622,8 @@ void shortcut_init(int unjustify)
 		NANO_OPENNEXT_ALTKEY, VIEW, open_nextfile_void);
 #endif
 
-#if !defined(NANO_SMALL) && defined(HAVE_REGEX_H)
+#ifndef NANO_SMALL
+#ifdef HAVE_REGEX_H
     sc_init_one(&main_list, NANO_NO_KEY, _("Find Other Bracket"),
 		IFHELP(nano_bracket_msg, NANO_BRACKET_KEY), NANO_NO_KEY,
 		NANO_NO_KEY, VIEW, do_find_bracket);
@@ -631,6 +632,7 @@ void shortcut_init(int unjustify)
     sc_init_one(&main_list, NANO_NO_KEY, _("Where Is Next"),
 		IFHELP(nano_whereis_next_msg, NANO_WHEREIS_NEXT_KEY),
 		NANO_NO_KEY, NANO_NO_KEY, VIEW, do_research);
+#endif
 
     free_shortcutage(&whereis_list);
 
diff --git a/src/proto.h b/src/proto.h
index 26349d58..5effeef6 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -372,7 +372,9 @@ int is_whole_word(int curr_pos, const char *datastr, const char
 int findnextstr(int can_display_wrap, int wholeword, const filestruct
 	*begin, size_t beginx, const char *needle, int no_sameline);
 int do_search(void);
+#ifndef NANO_SMALL
 int do_research(void);
+#endif
 void replace_abort(void);
 #ifdef HAVE_REGEX_H
 int replace_regexp(char *string, int create_flag);
diff --git a/src/search.c b/src/search.c
index eed733c8..588111f8 100644
--- a/src/search.c
+++ b/src/search.c
@@ -420,6 +420,7 @@ int do_search(void)
     return 1;
 }
 
+#ifndef NANO_SMALL
 /* Search for the next string without prompting. */
 int do_research(void)
 {
@@ -471,6 +472,7 @@ int do_research(void)
 
     return 1;
 }
+#endif
 
 void replace_abort(void)
 {
-- 
GitLab