We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
VimEnter
1 parent d4aee27 commit 1fe43f3Copy full SHA for 1fe43f3
lua/lazy/view/init.lua
@@ -65,9 +65,19 @@ function M.show(mode)
65
opts.col = (vim.o.columns - opts.width) / 2
66
local win = vim.api.nvim_open_win(buf, true, opts)
67
M._win = win
68
-
69
vim.api.nvim_set_current_win(win)
70
+ -- it seems that setting the current win doesn't work before VimEnter,
71
+ -- so do that then
72
+ if vim.v.vim_did_enter ~= 1 then
73
+ vim.api.nvim_create_autocmd("VimEnter", {
74
+ once = true,
75
+ callback = function()
76
+ vim.api.nvim_set_current_win(win)
77
+ end,
78
+ })
79
+ end
80
+
81
vim.bo[buf].buftype = "nofile"
82
vim.bo[buf].bufhidden = "wipe"
83
vim.wo[win].conceallevel = 3
0 commit comments