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

moving: make vertical movement account for varying chunk width

Use actual_last_column() to properly adjust the cursor if placewewant
is past the end of a softwrapped chunk.
No related merge requests found
Showing with 4 additions and 4 deletions
+4 -4
......@@ -88,7 +88,7 @@ void do_page_up(void)
openfile->placewewant = leftedge + target_column;
openfile->current_x = actual_x(openfile->current->data,
openfile->placewewant);
actual_last_column(leftedge, target_column));
/* Move the viewport so that the cursor stays immobile, if possible. */
adjust_viewport(STATIONARY);
......@@ -120,7 +120,7 @@ void do_page_down(void)
openfile->placewewant = leftedge + target_column;
openfile->current_x = actual_x(openfile->current->data,
openfile->placewewant);
actual_last_column(leftedge, target_column));
/* Move the viewport so that the cursor stays immobile, if possible. */
adjust_viewport(STATIONARY);
......@@ -480,7 +480,7 @@ void do_up(bool scroll_only)
openfile->placewewant = leftedge + target_column;
openfile->current_x = actual_x(openfile->current->data,
openfile->placewewant);
actual_last_column(leftedge, target_column));
/* When the cursor was on the first line of the edit window (or when just
* scrolling without moving the cursor), scroll the edit window up -- one
......@@ -524,7 +524,7 @@ void do_down(bool scroll_only)
openfile->placewewant = leftedge + target_column;
openfile->current_x = actual_x(openfile->current->data,
openfile->placewewant);
actual_last_column(leftedge, target_column));
/* When the cursor was on the last line of the edit window (or when just
* scrolling without moving the cursor), scroll the edit window down -- one
......
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