commit 77a1a5c3e408fd6846b6418cec42b566401e292a
parent bc8bb7e942c75df9df3a1a36d0fa840173125d68
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 13 Sep 2016 22:06:11 +0200
tweaks: reshuffle some ifdefs, for less fragmentation
Diffstat:
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git 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) {