diff --git a/ChangeLog b/ChangeLog index 472e8cdcf5b7415ce5bcea84f1c2f923b57124e6..8593a681a14ec17530a057f2dc6cbdd53a27c7af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2016-02-22 Benno Schulenberg <bensberg@justemail.net> * src/nano.c (free_openfilestruct): Elide this function. * scr/global.c (thanks_for_all_the_fish, free_list_item): Condense. + * src/winio.c (edit_scroll): The amount to scroll is never zero. 2016-02-21 Benno Schulenberg <bensberg@justemail.net> * src/files.c (input_tab): If the first Tab added the part that all diff --git a/src/winio.c b/src/winio.c index b0ce93ba497a3a5dfe8e93141fcd94c30a53087e..ce3c522e700092e59f6d58a56725c48b06b14628 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2848,9 +2848,7 @@ void edit_scroll(scroll_dir direction, ssize_t nlines) filestruct *foo; bool do_redraw = need_screen_update(0); - /* Don't bother scrolling less than one line. */ - if (nlines < 1) - return; + assert(nlines > 0); /* Part 1: nlines is the number of lines we're going to scroll the * text of the edit window. */