We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36f609d commit 1941a34Copy full SHA for 1941a34
1 file changed
lua/opencode/util.lua
@@ -13,6 +13,10 @@ end
13
14
function M.is_buf_a_file(bufnr)
15
bufnr = bufnr or vim.api.nvim_get_current_buf()
16
+ if not vim.api.nvim_buf_is_valid(bufnr) then
17
+ return false
18
+ end
19
+
20
local buftype = vim.bo[bufnr].buftype
21
local filepath = vim.api.nvim_buf_get_name(bufnr)
22
0 commit comments