From 90acbdbbffcb461bc6de3544bf8b695f7abeb168 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Wed, 24 May 2023 23:13:48 -0700 Subject: [PATCH] fix: error messages opening terminal in dir --- lua/oil/actions.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/oil/actions.lua b/lua/oil/actions.lua index 692b491..66b422d 100644 --- a/lua/oil/actions.lua +++ b/lua/oil/actions.lua @@ -140,6 +140,8 @@ M.open_terminal = { callback = function() local dir = oil.get_current_dir() if dir then + local bufnr = vim.api.nvim_create_buf(false, true) + vim.api.nvim_set_current_buf(bufnr) vim.fn.termopen(vim.o.shell, { cwd = dir }) end end,