Commit 62634163 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey Committed by Benno Schulenberg
Browse files

moving: always account for the margin when in line numbering mode

Like do_down() does already, do_pageup() and do_right() should use
editwincols instead of COLS.

This addresses https://savannah.gnu.org/bugs/?49796.
No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
......@@ -81,7 +81,7 @@ void do_page_up(void)
openfile->current = openfile->current->prev;
#ifndef NANO_TINY
if (ISSET(SOFTWRAP) && openfile->current) {
skipped += strlenpt(openfile->current->data) / COLS;
skipped += strlenpt(openfile->current->data) / editwincols;
#ifdef DEBUG
fprintf(stderr, "do_page_up: i = %d, skipped = %d based on line %ld len %lu\n",
i, skipped, (long)openfile->current->lineno, (unsigned long)strlenpt(openfile->current->data));
......@@ -593,7 +593,7 @@ void do_right(void)
openfile->current_x = 0;
#ifndef NANO_TINY
if (ISSET(SOFTWRAP))
openfile->current_y -= strlenpt(openfile->current->data) / COLS;
openfile->current_y -= strlenpt(openfile->current->data) / editwincols;
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment