Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Strange behavior when deleting buffer #321

Open
LamprosPitsillos opened this issue Sep 21, 2022 · 0 comments
Open

[Bug] Strange behavior when deleting buffer #321

LamprosPitsillos opened this issue Sep 21, 2022 · 0 comments

Comments

@LamprosPitsillos
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant