From cc0d50a2c266a06d38c29c737e8cb31a5855f278 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Mon, 25 Jun 2018 13:44:02 +0100 Subject: Improved version of #8613 This one behaves correctly eg in the presence of unicode --- src/nvim/api/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/api/window.c') diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c index b02e5b958d..5281a7c1f4 100644 --- a/src/nvim/api/window.c +++ b/src/nvim/api/window.c @@ -94,7 +94,7 @@ void nvim_win_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err) check_cursor_col_win(win); // Make sure we stick in this column. - win->w_curswant = (colnr_T)col; + win->w_set_curswant = true; // make sure cursor is in visible range even if win != curwin update_topline_win(win); -- cgit