commit 51371e0ca5953e2660306563dd9dbdb8a257ab06
parent 3bd66b78c1a207efd6763c533da97bc787163d76
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 5 Feb 2020 11:41:31 +0100
tweaks: exclude two unneeded fragments of code from the tiny version
Diffstat:
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/global.c b/src/global.c
@@ -300,6 +300,9 @@ void goto_dir(void)
}
#endif
#ifndef NANO_TINY
+void do_nothing(void)
+{
+}
void do_toggle_void(void)
{
}
@@ -340,11 +343,6 @@ void do_cancel(void)
{
}
-/* Ignore the start and stop sequences of a bracketed paste. */
-void do_nothing(void)
-{
-}
-
/* Add a function to the linked list of functions. */
void add_to_funcs(void (*func)(void), int menus, const char *desc,
const char *help, bool blank_after, bool viewok)
diff --git a/src/prompt.c b/src/prompt.c
@@ -485,8 +485,6 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
if (func == do_cancel || func == do_enter)
break;
- if (func == do_nothing)
- finished = FALSE;
#ifdef ENABLE_TABCOMP
if (func != do_tab)
@@ -552,6 +550,10 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
* the status-bar prompt. */
finished = FALSE;
}
+#ifndef NANO_TINY
+ else if (func == do_nothing)
+ finished = FALSE;
+#endif
/* If we have a shortcut with an associated function, break out if
* we're finished after running or trying to run the function. */
diff --git a/src/proto.h b/src/proto.h
@@ -683,6 +683,7 @@ void to_files(void);
void goto_dir(void);
#endif
#ifndef NANO_TINY
+void do_nothing(void);
void do_toggle_void(void);
void dos_format_void(void);
void mac_format_void(void);
@@ -698,4 +699,3 @@ void flip_newbuffer(void);
#endif
void discard_buffer(void);
void do_cancel(void);
-void do_nothing(void);