Commit 2456dd2a authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Not centering the current line when smooth scrolling is used.

This fixes Savannah bug #42654.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5149 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 8 additions and 6 deletions
+8 -6
......@@ -6,6 +6,8 @@
one byte but one character (possibly multibyte). Fixes Savannah
bug #42175, reported by myself, and the finding of ghosts seen in
https://lists.gnu.org/archive/html/nano-devel/2015-03/msg00055.html.
* src/winio.c (edit_redraw): Do not center the current line when
smooth scrolling is used. This fixes Savannah bug #42654.
2015-03-21 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_alt_speller): Remove some leftovers.
......
......@@ -3160,9 +3160,10 @@ void edit_redraw(filestruct *old_current, size_t pww_save)
}
#endif /* !NANO_TINY */
/* Put edittop in range of current, get the difference in lines
* between the original edittop and the current edittop, and
* then restore the original edittop. */
/* Make sure the current line is on the screen. */
if (ISSET(SMOOTH_SCROLL))
edit_update(NONE);
else
edit_update(CENTER);
/* Update old_current if we're not on the same page as
......@@ -3229,8 +3230,7 @@ void edit_refresh(void)
(long)openfile->current->lineno, (long)openfile->edittop->lineno, maxrows);
#endif
/* Put the top line of the edit window in range of the current
* line. */
/* Make sure the current line is on the screen. */
edit_update(CENTER);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment