Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replaced deprecated vim. functions #366

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lua/nui/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ end
---@return boolean
function utils.is_type(type_name, v)
if type_name == "list" then
return vim.tbl_islist(v)
return vim.islist(v)
end

if type_name == "map" then
return type(v) == "table" and not vim.tbl_islist(v)
return type(v) == "table" and not vim.islist(v)
end

return type(v) == type_name
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function popup.assert_border_lines(options, border_bufnr)
local size = { width = options.size.width, height = options.size.height }

local style = vim.deepcopy(options.border.style)
if vim.tbl_islist(style) then
if vim.islist(style) then
style = {
top_left = style[1],
top = style[2],
Expand Down