akinsho / akinsho/toggleterm.nvim

[Bug] Strange behavior when deleting buffer

未关闭
#321 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Lua
星标
5.6k
派生
206
PR 合并指标
30 天内没有已合并 PR

描述

https://user-images.githubusercontent.com/61395246/191591174-fe2e0f4b-2326-4f9e-b0ce-bea6ca905161.mp4

```lua
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "*.pdf",
-- command = [[silent! execute "!nozathura '%' --fork" | :bd %]],
callback = function()
local path = vim.api.nvim_buf_get_name(0)
vim.fn.jobstart({ "zathura", path }, { detach = true })
vim.api.nvim_buf_delete(0, {})
end,

})
```

I use this autocommand to open pdfs from neovim. If the terminal is open while this autocommand runs it takes the whole screen and it makes it impossible to regain control back (i need to trick it to switch buffer then exit the terminal and launch it again..)

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。