mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
fix(input): only disable mapped CTRL-C interrupts when getting input
(cherry picked from commit f3330023a5
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
ef43e7d1f6
commit
89260ea5d6
@@ -268,7 +268,7 @@ describe('system()', function()
|
||||
:call system("for /L %I in (1,0,2) do @echo y") |]]
|
||||
or [[
|
||||
:call system("yes") |]]))
|
||||
feed('<c-c>')
|
||||
feed('foo<c-c>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
~ |
|
||||
@@ -286,6 +286,49 @@ describe('system()', function()
|
||||
Type :qa and press <Enter> to exit Nvim |
|
||||
]])
|
||||
end)
|
||||
|
||||
it('`yes` interrupted with mapped CTRL-C', function()
|
||||
command('nnoremap <C-C> i')
|
||||
feed(':call system("' .. (iswin()
|
||||
and 'for /L %I in (1,0,2) do @echo y'
|
||||
or 'yes') .. '")<cr>')
|
||||
screen:expect([[
|
||||
|
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
]] .. (iswin()
|
||||
and [[
|
||||
:call system("for /L %I in (1,0,2) do @echo y") |]]
|
||||
or [[
|
||||
:call system("yes") |]]))
|
||||
feed('foo<c-c>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
-- INSERT -- |
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('passing no input', function()
|
||||
|
Reference in New Issue
Block a user