Skip to content

Commit

Permalink
fix: use schedule_wrap for select again (#59) (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Aug 31, 2022
1 parent f38eb33 commit 9cdb3e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/dressing/select/init.lua
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 9cdb3e0

Please sign in to comment.