aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/hl.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim/hl.lua')
-rw-r--r--runtime/lua/vim/hl.lua14
1 files changed, 1 insertions, 13 deletions
diff --git a/runtime/lua/vim/hl.lua b/runtime/lua/vim/hl.lua
index 49bbaa3cc6..099efa3c61 100644
--- a/runtime/lua/vim/hl.lua
+++ b/runtime/lua/vim/hl.lua
@@ -135,19 +135,7 @@ local yank_cancel --- @type fun()?
--- - event event structure (default vim.v.event)
--- - priority integer priority (default |vim.hl.priorities|`.user`)
function M.on_yank(opts)
- vim.validate({
- opts = {
- opts,
- function(t)
- if t == nil then
- return true
- else
- return type(t) == 'table'
- end
- end,
- 'a table or nil to configure options (see `:h vim.hl.on_yank`)',
- },
- })
+ vim.validate('opts', opts, 'table', true)
opts = opts or {}
local event = opts.event or vim.v.event
local on_macro = opts.on_macro or false