nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit e0d9fee5d618bea96ed5f14e3caf440c309a2eb9
parent 065672bf12e403f981aad87eee5535a85bede9af
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 24 Oct 2018 17:30:27 +0200

build: exclude scrolling functions only from tiny version without help

This fixes https://savannah.gnu.org/bugs/?54891.

Diffstat:
Msrc/global.c | 8++++----
Msrc/move.c | 2+-
Msrc/proto.h | 2+-
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/global.c b/src/global.c @@ -602,7 +602,7 @@ void shortcut_init(void) #ifndef NANO_TINY const char *bracket_gist = N_("Go to the matching bracket"); #endif -#ifdef ENABLE_HELP +#if !defined(NANO_TINY) || defined(ENABLE_HELP) const char *scrollup_gist = N_("Scroll up one line without moving the cursor textually"); const char *scrolldown_gist = @@ -882,7 +882,7 @@ void shortcut_init(void) N_("Prev Line"), WITHORSANS(prevline_gist), TOGETHER, VIEW); add_to_funcs(do_down, MMAIN|MHELP|MBROWSER, N_("Next Line"), WITHORSANS(nextline_gist), TOGETHER, VIEW); -#ifdef ENABLE_HELP +#if !defined(NANO_TINY) || defined(ENABLE_HELP) add_to_funcs(do_scroll_up, MMAIN, N_("Scroll Up"), WITHORSANS(scrollup_gist), TOGETHER, VIEW); add_to_funcs(do_scroll_down, MMAIN, @@ -1213,7 +1213,7 @@ void shortcut_init(void) add_to_sclist(MMAIN, "M-)", 0, do_para_end_void, 0); add_to_sclist(MMAIN, "M-0", 0, do_para_end_void, 0); #endif -#ifdef ENABLE_HELP +#if !defined(NANO_TINY) || defined(ENABLE_HELP) add_to_sclist(MMAIN, "M--", 0, do_scroll_up, 0); add_to_sclist(MMAIN, "M-_", 0, do_scroll_up, 0); add_to_sclist(MMAIN, "M-+", 0, do_scroll_down, 0); @@ -1539,7 +1539,7 @@ sc *strtosc(const char *input) else if (!strcasecmp(input, "down") || !strcasecmp(input, "nextline")) s->func = do_down; -#ifdef ENABLE_HELP +#if !defined(NANO_TINY) || defined(ENABLE_HELP) else if (!strcasecmp(input, "scrollup")) s->func = do_scroll_up; else if (!strcasecmp(input, "scrolldown")) diff --git a/src/move.c b/src/move.c @@ -540,7 +540,7 @@ void do_down(void) openfile->placewewant = leftedge + target_column; } -#ifdef ENABLE_HELP +#if !defined(NANO_TINY) || defined(ENABLE_HELP) /* Scroll up one line or chunk without scrolling the cursor. */ void do_scroll_up(void) { diff --git a/src/proto.h b/src/proto.h @@ -376,7 +376,7 @@ void do_home(void); void do_end(void); void do_up(void); void do_down(void); -#ifdef ENABLE_HELP +#if !defined(NANO_TINY) || defined(ENABLE_HELP) void do_scroll_up(void); void do_scroll_down(void); #endif