Skip to content

Commit 7c9bc48

Browse files
authored
fix: correctly handle stdin (#513)
1 parent 591b5b2 commit 7c9bc48

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

plugin/dashboard.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22

33
local g = vim.api.nvim_create_augroup('dashboard', { clear = true })
44

5-
vim.api.nvim_create_autocmd('StdinReadPre', {
5+
vim.api.nvim_create_autocmd('VimEnter', {
66
group = g,
77
callback = function()
8-
vim.g.read_from_stdin = 1
8+
for _, v in pairs(vim.v.argv) do
9+
if v == "-" then
10+
vim.g.read_from_stdin = 1
11+
break
12+
end
13+
end
914
end,
1015
})
1116

0 commit comments

Comments
 (0)