diff --git a/lua/distant-core/ui/nodes.lua b/lua/distant-core/ui/nodes.lua index 2b901a2..41e9cf5 100644 --- a/lua/distant-core/ui/nodes.lua +++ b/lua/distant-core/ui/nodes.lua @@ -283,7 +283,12 @@ function M.Table(rows, extra) end end - if type(extra) == 'table' and vim.tbl_isarray(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 = {}