Skip to content

Commit

Permalink
fix: vim.validate not compatible with v0.10 (#1516)
Browse files Browse the repository at this point in the history
  • Loading branch information
vunhatchuong authored Jan 14, 2025
1 parent 99b4e71 commit 8084e84
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/lspsaga/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ end
---@param fallback string
---@return string 'utf-8'|'utf-16'|'utf-32'
function M.get_offset_encoding(filter, fallback)
vim.validate('filter', filter, 'table', true)
if vim.fn.has('nvim-0.11') == 1 then
vim.validate('filter', filter, 'table', true)
else
vim.validate({ filter = { filter, 'table' } })
end
filter = filter or {}
fallback = fallback or 'utf-16'

Expand Down

0 comments on commit 8084e84

Please sign in to comment.