fix: use schedule_wrap for select again (#59) (#58)

This commit is contained in:
Steven Arcangeli 2022-08-31 08:37:33 -07:00
parent f38eb33572
commit 9cdb3e0f09
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,5 @@
local global_config = require("dressing.config")
local patch = require("dressing.patch")
local util = require("dressing.util")
local function get_backend(config)
local backends = config.backend
@ -18,7 +17,9 @@ end
-- use schedule_wrap to avoid a bug when vim opens
-- (see https://github.com/stevearc/dressing.nvim/issues/15)
return util.schedule_wrap_before_vimenter(function(items, opts, on_choice)
-- also to prevent focus problems for providers
-- (see https://github.com/stevearc/dressing.nvim/issues/59)
return vim.schedule_wrap(function(items, opts, on_choice)
vim.validate({
items = {
items,