in 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 git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3254 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
5b7b3e3c9c
commit
47cfd197b8
|
@ -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:
|
||||
|
|
11
src/winio.c
11
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;
|
||||
|
|
Loading…
Reference in New Issue