From f3c4dadcf6f8adb658bba2bd4ff56db713c42c07 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 28 Mar 2018 16:37:47 +0200 Subject: [PATCH] build: fix compilation with --enable-{tiny,help,multibuffer} --- src/move.c | 11 +++++++---- src/proto.h | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/move.c b/src/move.c index eb80157c..8261d11b 100644 --- a/src/move.c +++ b/src/move.c @@ -521,7 +521,7 @@ void do_down(void) openfile->placewewant = leftedge + target_column; } -#ifndef NANO_TINY +#ifdef ENABLE_HELP /* Scroll up one line or chunk without scrolling the cursor. */ void do_scroll_up(void) { @@ -541,9 +541,12 @@ void do_scroll_down(void) if (openfile->current_y == 0) do_down(); - if (openfile->edittop->next != NULL || - chunk_for(openfile->firstcolumn, openfile->edittop) < - number_of_chunks_in(openfile->edittop)) + if (openfile->edittop->next != NULL +#ifndef NANO_TINY + || chunk_for(openfile->firstcolumn, openfile->edittop) < + number_of_chunks_in(openfile->edittop) +#endif + ) edit_scroll(FORWARD); } #endif diff --git a/src/proto.h b/src/proto.h index 0d10073a..cda49650 100644 --- a/src/proto.h +++ b/src/proto.h @@ -387,7 +387,7 @@ void do_home(void); void do_end(void); void do_up(void); void do_down(void); -#ifndef NANO_TINY +#ifdef ENABLE_HELP void do_scroll_up(void); void do_scroll_down(void); #endif