Skip to content

Commit

Permalink
Fixed choose window action.
Browse files Browse the repository at this point in the history
  • Loading branch information
obaland committed Mar 6, 2023
1 parent 47966fa commit d7d5af4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/vfiler/actions/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ local function choose_window(winid)
local winids = {}
for winnr = 1, vim.fn.winnr('$') do
local bufnr = vim.fn.winbufnr(winnr)
if not Buffer.is_vfiler_buffer(bufnr) then
if
vim.fn.bufwinnr(bufnr) >= 1
and (not Buffer.is_vfiler_buffer(bufnr))
then
table.insert(winids, vim.fn.win_getid(winnr))
end
end
Expand Down
9 changes: 9 additions & 0 deletions lua/vfiler/libs/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,15 @@ end
M.list = {}
M.table = {}

function M.list.indexof(list, value)
for i, v in ipairs(list) do
if v == value then
return i
end
end
return -1
end

function M.list.extend(dest, src)
local pos = #dest
for i = 1, #src do
Expand Down

0 comments on commit d7d5af4

Please sign in to comment.