commit 17abce073f07f9fe628a2c35fa910afc2f867026
parent 02d50bd4aaa76ed2b9cf18f6a1deb344e669d14b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 30 Mar 2024 10:39:10 +0100
display: do not attempt to draw a line that is outside the viewport
When we're on the last row in the viewport, it is unwise to try and draw
the next line.
This fixes https://savannah.gnu.org/bugs/?65539.
The issue was reported by `correctmost`.
Bug existed since commit c2322f85 from three days ago.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1522,7 +1522,8 @@ void inject(char *burst, size_t count)
#else
if (margin)
#endif
- update_line(thisline->next, 0);
+ if (openfile->current_y < editwinrows - 1)
+ update_line(thisline->next, 0);
}
#ifndef NANO_TINY