diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-02-15 11:12:09 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-15 11:53:12 +0800 |
commit | f92e74900fda4583001cb85ba7f974394948ce1a (patch) | |
tree | f1185aac2938419851d332ddef7beb7ac44fe2b9 /src/nvim/api/window.c | |
parent | 1bd6c0a05c18e10e9439b4090e6f57f0d1e1fc21 (diff) | |
download | rneovim-f92e74900fda4583001cb85ba7f974394948ce1a.tar.gz rneovim-f92e74900fda4583001cb85ba7f974394948ce1a.tar.bz2 rneovim-f92e74900fda4583001cb85ba7f974394948ce1a.zip |
fix(api): nvim_win_set_cursor() redraw for cursorline and statusline
Diffstat (limited to 'src/nvim/api/window.c')
-rw-r--r-- | src/nvim/api/window.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c index fc7823a070..9c473ff724 100644 --- a/src/nvim/api/window.c +++ b/src/nvim/api/window.c @@ -71,6 +71,7 @@ ArrayOf(Integer, 2) nvim_win_get_cursor(Window window, Error *err) } /// Sets the (1,0)-indexed cursor position in the window. |api-indexing| +/// Unlike |win_execute()| this scrolls the window. /// /// @param window Window handle, or 0 for current window /// @param pos (row, col) tuple representing the new position @@ -118,6 +119,8 @@ void nvim_win_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err) update_topline_win(win); redraw_later(win, VALID); + redraw_for_cursorline(win); + win->w_redr_status = true; } /// Gets the window height |