fix(priority): support <C-a>/<C-x> in all visual modes

Problem: `<C-a>` and `<C-x>` only worked in normal mode for single-task
priority adjustment. In visual mode (`v`, `V`, `<C-v>`), they fell
through to Vim's native number increment. Only `g<C-a>`/`g<C-x>` were
mapped for visual batch priority.

Solution: add `priority_up` and `priority_down` to the visual actions
table so `<C-a>`/`<C-x>` call the batch function in all visual modes.
Add corresponding `x`-mode `<Plug>` mappings. Document that both
mappings work in normal and visual mode.
This commit is contained in:
Barrett Ruth 2026-03-12 20:35:57 -04:00
parent b2456580b5
commit 34242d3b98
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 40 additions and 6 deletions

View file

@ -404,6 +404,12 @@ function M._setup_buf_mappings(bufnr)
---@type table<string, fun()>
local visual_actions = {
priority_up = function()
M.increment_priority_visual()
end,
priority_down = function()
M.decrement_priority_visual()
end,
priority_up_visual = function()
M.increment_priority_visual()
end,