screen: don't compare a character index with a column position

This addresses part of https://savannah.gnu.org/patch/?9216.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
master
Benno Schulenberg 2017-01-11 17:22:46 +01:00
parent eca6faee5b
commit 16a7fd4bfc
1 changed files with 1 additions and 1 deletions

View File

@ -2711,7 +2711,7 @@ int update_line(filestruct *fileptr, size_t index)
#endif
if (page_start > 0)
mvwaddch(edit, line, margin, '$');
if (strlenpt(fileptr->data) > page_start + editwincols)
if (strlenpt(fileptr->data + page_start) > editwincols)
mvwaddch(edit, line, COLS - 1, '$');
#ifndef NANO_TINY
} else {