Commit fc9c7b49 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

softwrap: scroll when searching lands on an overlong bottom line

This fixes https://savannah.gnu.org/bugs/index.php?42189.
No related merge requests found
Showing with 4 additions and 0 deletions
+4 -0
......@@ -2873,6 +2873,10 @@ void edit_redraw(filestruct *old_current)
/* If the current line is offscreen, scroll until it's onscreen. */
if (openfile->current->lineno >= openfile->edittop->lineno + maxrows ||
#ifndef NANO_TINY
(openfile->current->lineno == openfile->edittop->lineno + maxrows - 1 &&
ISSET(SOFTWRAP) && strlenpt(openfile->current->data) >= COLS) ||
#endif
openfile->current->lineno < openfile->edittop->lineno) {
edit_update((focusing || !ISSET(SMOOTH_SCROLL)) ? CENTERING : FLOWING);
refresh_needed = TRUE;
......
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