Fix c/cpp mapping to wrap lines in #if 0/#endif

Use `x` mapping so that the mapping does not also get enabled in select
mode.
This commit is contained in:
2026-03-24 13:02:38 +00:00
parent 8f3bda4a58
commit 6a60508ff2
2 changed files with 2 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
local opts = { buffer = true, remap = false, silent = true } local opts = { buffer = true, remap = false, silent = true }
vim.keymap.set('v', '0', ':PreProcIfWrap<CR>', opts) vim.keymap.set('x', '0', ':PreProcIfWrap<CR>', opts)

View File

@@ -2,5 +2,4 @@ vim.opt.commentstring = '//%s'
vim.opt.matchpairs:append('<:>') vim.opt.matchpairs:append('<:>')
local opts = { buffer = true, remap = false, silent = true } local opts = { buffer = true, remap = false, silent = true }
-- vim.keymap.set('n', '0', ':PreProcIfWrap<CR>', opts) vim.keymap.set('x', '0', ':PreProcIfWrap<CR>', opts)
vim.keymap.set('v', '0', ':PreProcIfWrap<CR>', opts)