aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/window.c
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2024-03-14 23:55:32 +0100
committerLuuk van Baal <luukvbaal@gmail.com>2024-03-15 09:15:50 +0100
commitc971f538ab87b537ae4c97bd44167661c5691a2d (patch)
treefd0d59de9b23e2676010aabc4652b4bc9417d979 /src/nvim/api/window.c
parentca7dd33fa783181d62b0573082d2e691fcfc29d2 (diff)
downloadrneovim-c971f538ab87b537ae4c97bd44167661c5691a2d.tar.gz
rneovim-c971f538ab87b537ae4c97bd44167661c5691a2d.tar.bz2
rneovim-c971f538ab87b537ae4c97bd44167661c5691a2d.zip
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.
Diffstat (limited to 'src/nvim/api/window.c')
-rw-r--r--src/nvim/api/window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c
index 026d09d9a9..30f77c7248 100644
--- a/src/nvim/api/window.c
+++ b/src/nvim/api/window.c
@@ -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);