fix(defaults): don't replace keycodes in Visual search mappings (#31460)

Also remove "silent" to be more consistent with Normal mode search.
This commit is contained in:
zeertzjq
2024-12-05 19:03:58 +08:00
committed by GitHub
parent 6a929b15c9
commit 8323398bc6
2 changed files with 70 additions and 2 deletions

View File

@@ -49,10 +49,10 @@ do
vim.keymap.set('x', '*', function()
return _visual_search('/')
end, { desc = ':help v_star-default', expr = true, silent = true })
end, { desc = ':help v_star-default', expr = true, replace_keycodes = false })
vim.keymap.set('x', '#', function()
return _visual_search('?')
end, { desc = ':help v_#-default', expr = true, silent = true })
end, { desc = ':help v_#-default', expr = true, replace_keycodes = false })
end
--- Map Y to y$. This mimics the behavior of D and C. See |Y-default|