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:
parent
b2456580b5
commit
34242d3b98
3 changed files with 40 additions and 6 deletions
|
|
@ -402,6 +402,16 @@ vim.keymap.set('n', '<Plug>(pending-priority-down)', function()
|
|||
require('pending').decrement_priority()
|
||||
end)
|
||||
|
||||
vim.keymap.set('x', '<Plug>(pending-priority-up)', function()
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<Esc>', true, false, true), 'nx', false)
|
||||
require('pending').increment_priority_visual()
|
||||
end)
|
||||
|
||||
vim.keymap.set('x', '<Plug>(pending-priority-down)', function()
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<Esc>', true, false, true), 'nx', false)
|
||||
require('pending').decrement_priority_visual()
|
||||
end)
|
||||
|
||||
vim.keymap.set('x', '<Plug>(pending-priority-up-visual)', function()
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<Esc>', true, false, true), 'nx', false)
|
||||
require('pending').increment_priority_visual()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue