fix(defaults): enable :terminal [[,]] motion in operator-pending mode #33217

This enables y]] to copy a command and its output.

(cherry picked from commit 57b4fb5c53)
This commit is contained in:
Ghjuvan Lacambre
2025-03-31 15:22:21 +02:00
committed by github-actions[bot]
parent 70f3e15298
commit 837c9d0409

View File

@ -622,10 +622,10 @@ do
end
vim.wo[0][0].winhighlight = winhl .. 'StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC'
vim.keymap.set({ 'n', 'x' }, '[[', function()
vim.keymap.set({ 'n', 'x', 'o' }, '[[', function()
jump_to_prompt(nvim_terminal_prompt_ns, 0, args.buf, -vim.v.count1)
end, { buffer = args.buf, desc = 'Jump [count] shell prompts backward' })
vim.keymap.set({ 'n', 'x' }, ']]', function()
vim.keymap.set({ 'n', 'x', 'o' }, ']]', function()
jump_to_prompt(nvim_terminal_prompt_ns, 0, args.buf, vim.v.count1)
end, { buffer = args.buf, desc = 'Jump [count] shell prompts forward' })
end,