Merge pull request #69 from emmanueltouzery/fix_win

fix issue when operating from a floating window
This commit is contained in:
Steven Arcangeli 2022-10-03 08:12:08 -07:00 committed by GitHub
commit 12b808a686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -65,7 +65,9 @@ return vim.schedule_wrap(function(items, opts, on_choice)
items,
opts,
vim.schedule_wrap(function(...)
vim.api.nvim_win_set_cursor(winid, cursor)
if vim.api.nvim_win_is_valid(winid) then
vim.api.nvim_win_set_cursor(winid, cursor)
end
on_choice(...)
end)
)