mirror of
https://github.com/neovim/neovim
synced 2025-07-19 18:51:46 +00:00
fix(defaults): visual-mode [[,]] for :terminal shell prompts #33203
Problem:
:terminal shell prompt jump mappings ]]/[[ don't work in visual mode.
Solution:
Also define them for in visual mode.
(cherry picked from commit cb247e06f0
)
Co-authored-by: msaher <77233589+msaher@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
89e0ea1788
commit
7e884b78bf
@ -622,10 +622,10 @@ do
|
||||
end
|
||||
vim.wo[0][0].winhighlight = winhl .. 'StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC'
|
||||
|
||||
vim.keymap.set('n', '[[', function()
|
||||
vim.keymap.set({ 'n', 'x' }, '[[', 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', ']]', function()
|
||||
vim.keymap.set({ 'n', 'x' }, ']]', 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,
|
||||
|
Reference in New Issue
Block a user