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:
parent
9a0781a6ff
commit
8686312b40
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue