aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/window.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c
index abfa0dc20b..b02e5b958d 100644
--- a/src/nvim/api/window.c
+++ b/src/nvim/api/window.c
@@ -93,6 +93,9 @@ void nvim_win_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err)
// When column is out of range silently correct it.
check_cursor_col_win(win);
+ // Make sure we stick in this column.
+ win->w_curswant = (colnr_T)col;
+
// make sure cursor is in visible range even if win != curwin
update_topline_win(win);