Skip to content

Commit 7e0a166

Browse files
committed
enhance vim version check for vim.validate
1 parent 9280037 commit 7e0a166

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lua/osv/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ end
156156

157157
function M.launch(opts)
158158
local nvim_version = vim.version()
159-
if nvim_version.minor >= 11 then
159+
if nvim_version.major > 0 or nvim_version.minor >= 11 then
160160
vim.validate("opts", opts, 'table', true)
161161

162162
if opts then

src/launch.lua.t2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
;; implement
33
function M.launch(opts)
44
local nvim_version = vim.version()
5-
if nvim_version.minor >= 11 then
5+
if nvim_version.major > 0 or nvim_version.minor >= 11 then
66
; verify launch arguments new interface
77
else
88
; verify launch arguments old interface

0 commit comments

Comments
 (0)