mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-21 20:31:20 +03:00
Not going beyond the number of available rows in the edit window.
This fixes Savannah bug #42188. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5539 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
ebbb5b5d1e
commit
ec4ee1c489
@ -2,6 +2,8 @@
|
||||
* 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
|
||||
|
@ -2789,7 +2789,7 @@ int update_line(filestruct *fileptr, size_t index)
|
||||
#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);
|
||||
|
Loading…
Reference in New Issue
Block a user