Skip to content

Commit

Permalink
fix(smart-open): only avoid curwin if it's a term
Browse files Browse the repository at this point in the history
  • Loading branch information
willothy committed Aug 10, 2023
1 parent 11f9960 commit 6813ad3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lua/flatten/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ end

---@param focus Flatten.BufInfo
function M.smart_open(focus)
local curwin = vim.api.nvim_get_current_win()

-- set of valid target windows
local valid_targets = {}
for _, win in ipairs(vim.api.nvim_list_wins()) do
local win_buf = vim.api.nvim_win_get_buf(win)
if
win ~= curwin
and vim.api.nvim_win_get_config(win).zindex == nil
vim.api.nvim_win_get_config(win).zindex == nil
and vim.bo[win_buf].buftype == ""
then
valid_targets[win] = true
Expand Down

0 comments on commit 6813ad3

Please sign in to comment.