commit 6318edadc32acce3ed41a6995a5faa5395b5f562
parent 7c077a3c2b78387b633b90be92096dd6d357cad7
Author: Justin M. Keyes <justinkz@gmail.com>
Date: Sat, 8 Jul 2023 15:28:13 +0200
fix(defaults): visual hash (#) on text with "?"
Problem:
The default "#" mapping fails on the following example after v$h# with
cursor at start of the first line:
aa?/\bb
aa
aa?/\bb
Solution:
Also escape "?".
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua
@@ -1029,7 +1029,7 @@ function vim._init_default_mappings()
local esc_chunks = vim
.iter(chunks)
:map(function(v)
- return vim.fn.escape(v, [[/\]])
+ return vim.fn.escape(v, [[?/\]])
end)
:totable()
local esc_pat = table.concat(esc_chunks, [[\n]])