Skip to content

Commit

Permalink
Only coladvance for curwin
Browse files Browse the repository at this point in the history
  • Loading branch information
luukvbaal committed Sep 26, 2022
1 parent ab812da commit 2b76bb4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,8 @@ cursor_up(
}

// try to advance to the column we want to be at
coladvance(wp->w_curswant);
if (wp == curwin)
coladvance(wp->w_curswant);

if (upd_topline)
update_topline(); // make sure curwin->w_topline is valid
Expand Down Expand Up @@ -2858,7 +2859,8 @@ cursor_down(
}

// try to advance to the column we want to be at
coladvance(wp->w_curswant);
if (wp == curwin)
coladvance(wp->w_curswant);

if (upd_topline)
update_topline(); // make sure curwin->w_topline is valid
Expand Down

0 comments on commit 2b76bb4

Please sign in to comment.