This fixes Savannah bug #42188.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5539
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
* src/color.c (precalc_multicolorinfo), src/winio.c (edit_draw):
Make sure to keep advancing also when matches are zero-length.
This fixes Savannah bug #26977 reported by Tigrmesh.
+ * src/winio.c (update_line): For softwrap, don't go beyond the number
+ of available rows in the edit window. This fixes Savannah bug #42188.
2016-01-07 Benno Schulenberg <bensberg@justemail.net>
* src/global.c (assign_keyinfo): Delete two unneeded #ifdefs: if
#ifndef NANO_TINY
} else {
size_t full_length = strlenpt(fileptr->data);
- for (index += COLS; index <= full_length && line < editwinrows; index += COLS) {
+ for (index += COLS; index <= full_length && line < editwinrows - 1; index += COLS) {
line++;
#ifdef DEBUG
fprintf(stderr, "update_line(): softwrap code, moving to %d index %lu\n", line, (unsigned long)index);