Commit 49fb755c authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

moving: get <Up> unstuck when trying to pass over a sprawling tab

This is a temporary fix.  The resultant movement is erratic and
not what is desired (which is: to stay in the same screen column
as much as possible).
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
......@@ -462,6 +462,7 @@ void do_end(void)
void do_up(bool scroll_only)
{
filestruct *was_current = openfile->current;
size_t was_x = openfile->current_x;
size_t was_column = xplustabs();
size_t leftedge, target_column;
......@@ -479,6 +480,8 @@ void do_up(bool scroll_only)
openfile->placewewant = leftedge + target_column;
openfile->current_x = proper_x(openfile->current->data, leftedge,
actual_last_column(leftedge, target_column));
if (openfile->current == was_current && openfile->current_x == was_x)
openfile->current_x--;
/* 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
......
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