From 77a1a5c3e408fd6846b6418cec42b566401e292a Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 13 Sep 2016 22:06:11 +0200
Subject: [PATCH] tweaks: reshuffle some ifdefs, for less fragmentation

---
 src/move.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/move.c b/src/move.c
index 06cabe38..36cdbdfa 100644
--- a/src/move.c
+++ b/src/move.c
@@ -501,26 +501,23 @@ void do_down(bool scroll_only)
      * smooth scrolling mode, or down half a page if we're not.  If
      * scroll_only is TRUE, scroll the edit window down one line
      * unconditionally. */
-    if (openfile->current_y == editwinrows - 1
-#ifndef NANO_TINY
-	|| amount > 0 || scroll_only
-#endif
-	) {
 #ifndef NANO_TINY
+    if (openfile->current_y == editwinrows - 1 || amount > 0 || scroll_only) {
 	if (amount < 1 || scroll_only)
 	    amount = 1;
-#endif
-	edit_scroll(DOWNWARD,
-#ifndef NANO_TINY
-		(ISSET(SMOOTH_SCROLL) || scroll_only) ? amount :
-#endif
-		editwinrows / 2 + 1);
+
+	edit_scroll(DOWNWARD, (ISSET(SMOOTH_SCROLL) || scroll_only) ?
+				amount : editwinrows / 2 + 1);
 
 	if (ISSET(SOFTWRAP)) {
 	    refresh_needed = TRUE;
 	    return;
 	}
-    }
+#else
+    if (openfile->current_y == editwinrows - 1)
+	edit_scroll(DOWNWARD, editwinrows / 2 + 1);
+#endif
+   }
 
     /* If the lines weren't already redrawn, see if they need to be. */
     if (openfile->current_y < editwinrows - 1) {
-- 
GitLab