Skip to content

Commit

Permalink
Merge branch 'v0.3' of github.com:chipsenkbeil/distant.nvim into v0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
chipsenkbeil committed Jul 6, 2023
2 parents c9e3841 + a4fb360 commit 30012a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/distant-core/ui/nodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,12 @@ function M.Table(rows, extra)
end
end

if type(extra) == 'table' and vim.tbl_islist(extra) then
-- For neovim 0.10+, `tbl_isarray` is the new `tbl_islist` whereas on earlier versions
-- there is no `tbl_isarray`; so, check if we have the new function and use it otherwise
-- fall back to the old function.
local isarray = vim.tbl_isarray or vim.tbl_islist

if type(extra) == 'table' and isarray(extra) then
--- @type distant.core.ui.INode[]
local rows_with_extra = {}

Expand Down

0 comments on commit 30012a2

Please sign in to comment.