Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2e45a6a

Browse files
fix(tests): Move validator version check outside
This fixes tests on versions <0.10
1 parent ad88620 commit 2e45a6a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/orgmode/utils/validator.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
local M = {}
22

3+
local has_v_0_11 = vim.fn.has('nvim-0.11') > 0
4+
35
--- Use the faster validate version if available
46
-- Taken from: https://github.com/lukas-reineke/indent-blankline.nvim/pull/934/files#diff-09ebcaa8c75cd1e92d25640e377ab261cfecaf8351c9689173fd36c2d0c23d94R16
57
--- @param spec table<string,[any, vim.validate.Validator, boolean|string]>
68
function M.validate(spec)
7-
if vim.fn.has('nvim-0.11') == 0 then
9+
if not has_v_0_11 then
810
return vim.validate(spec)
911
end
1012
for key, key_spec in pairs(spec) do

0 commit comments

Comments
 (0)