mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
fix(api): update grid cursor in nvim_win_set_cursor()
Problem: Cursor position set by nvim_win_set_cursor() is not reflected on the screen when followed by a blocking call like getchar(). Solution: Immediately update the cursor position on the grid.
This commit is contained in:
@@ -148,7 +148,7 @@ void nvim_win_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err)
|
||||
switchwin_T switchwin;
|
||||
switch_win(&switchwin, win, NULL, true);
|
||||
update_topline(curwin);
|
||||
validate_cursor(curwin);
|
||||
setcursor_mayforce(true);
|
||||
restore_win(&switchwin, true);
|
||||
|
||||
redraw_later(win, UPD_VALID);
|
||||
|
Reference in New Issue
Block a user