Skip to content

Commit

Permalink
fix: use vim.islist for new version
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed May 17, 2024
1 parent 4ffdefe commit ad38b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/guard/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function util.get_lsp_root(buf)
end

function util.as_table(t)
return vim.tbl_islist(t) and t or { t }
return (vim.fn.has('nvim-0.10') == 1 and vim.islist or vim.tbl_islist)(t) and t or { t }
end

-- TODO: Use `vim.region()` instead ?
Expand Down

0 comments on commit ad38b54

Please sign in to comment.