akinsho / akinsho/toggleterm.nvim

[Bug] Strange behavior when deleting buffer

Ouverte
#321 0 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Lua
Étoiles
5.6k
Forks
206
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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..)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.