diff --git a/ChangeLog b/ChangeLog index 6ae09732..c0114395 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,14 @@ CVS code - - Miscellaneous comment fixes. (DLR) - Remove unnecessary #ifdef around termios.h #include in nano.c. (DLR) +- winio.c: + edit_scroll() + - Redraw the lines before and after the scrolled region even if + the scrolled region was only one line. This fixes a display + problem that occurs after doing a search that scrolls the + screen down one line and leaves the cursor on the last line of + the screen, in which case we need to update the line after the + scrolled region. (DLR) GNU nano 1.3.10 - 2005.12.23 - General: diff --git a/src/winio.c b/src/winio.c index e7b4b92d..03c4961e 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3,7 +3,7 @@ * winio.c * * * * Copyright (C) 1999-2004 Chris Allegretta * - * Copyright (C) 2005 David Lawrence Ramsey * + * Copyright (C) 2005-2006 David Lawrence Ramsey * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2, or (at your option) * @@ -2702,12 +2702,9 @@ void edit_scroll(scroll_dir direction, ssize_t nlines) 1 >= openfile->filebot->lineno)) nlines = editwinrows; - /* If the scrolled region contains only one line, and the line - * before it is visible in the edit window, we need to draw it too. - * If the scrolled region contains more than one line, and the lines - * before and after the scrolled region are visible in the edit - * window, we need to draw them too. */ - nlines += (nlines == 1) ? 1 : 2; + /* If the lines before and after the scrolled region are visible in + * the edit window, we need to draw them too. */ + nlines += 2; if (nlines > editwinrows) nlines = editwinrows;