vim: fix failing kemaps for command line mode

This has been broken for a while. Neovim seems to not like the key
`silent` to be set at all for mappings in command line mode.
This commit is contained in:
Fernando Schauenburg 2024-02-12 01:10:39 +01:00
parent 9a0781a6ff
commit 8686312b40

View file

@ -1,8 +1,10 @@
local M = {}
local map = function(mode, lhs, rhs, opts)
opts = opts or {}
opts.silent = opts.silent ~= false -- silent by default
if mode ~= 'c' then
opts = opts or {}
opts.silent = opts.silent ~= false -- silent by default
end
vim.keymap.set(mode, lhs, rhs, opts)
end