nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 861085701574a0a9750c3b51cb07d4604353d24a
parent 17abce073f07f9fe628a2c35fa910afc2f867026
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat, 30 Mar 2024 11:03:50 +0100

feedback: drop an unnecessary warning, to not bother the user

The idea of the warning was that `row < 0 || row >= editwinrows` would
never be true: that the check was redundant and could be removed.

As it appears to be too hard to make sure in advance that a chunk will
not fall outside the viewport, just drop the warning and leave the check
in place.

This also addresses https://savannah.gnu.org/bugs/?64168.
Reported-by: Matteo Raso <matteo_luigi_raso@protonmail.com>

Diffstat:
Msrc/winio.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -2914,11 +2914,8 @@ int update_softwrapped_line(linestruct *line) } /* If the first chunk is offscreen, don't even try to display it. */ - if (row < 0 || row >= editwinrows) { - statusline(ALERT, "Badness: tried to display a chunk on row %i" - " -- please report a bug", row); + if (row < 0 || row >= editwinrows) return 0; - } starting_row = row;