Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lua/opencode/context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ Context.__index = Context
local ns_id = vim.api.nvim_create_namespace("OpencodeContext")

local function is_buf_valid(buf)
return vim.api.nvim_buf_is_loaded(buf)
and vim.api.nvim_get_option_value("buftype", { buf = buf }) == ""
and vim.api.nvim_buf_get_name(buf) ~= ""
return vim.api.nvim_get_option_value("buftype", { buf = buf }) == "" and vim.api.nvim_buf_get_name(buf) ~= ""
end

local function last_used_valid_win()
Expand Down