From 9cdb3e0f0973447b940b35d3175dc780301de427 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Wed, 31 Aug 2022 08:37:33 -0700 Subject: [PATCH] fix: use schedule_wrap for select again (#59) (#58) --- lua/dressing/select/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/dressing/select/init.lua b/lua/dressing/select/init.lua index aab362f..9a77a1f 100644 --- a/lua/dressing/select/init.lua +++ b/lua/dressing/select/init.lua @@ -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,