vim-patch:9.0.1385: g'Esc is considered an error (#22544)

Problem:    g'Esc is considered an error.
Solution:   Make g'Esc silently abandon the command. (closes vim/vim#12110)

f86dea8119
This commit is contained in:
zeertzjq
2023-03-06 07:52:11 +08:00
committed by GitHub
parent 533d671271
commit e389b18902
3 changed files with 62 additions and 4 deletions

View File

@@ -44,7 +44,10 @@ describe('ui mode_change event', function()
{0:~ }|
|
]], mode="normal"}
end)
-- oldtest: Test_mouse_shape_after_failed_change()
it('is restored to Normal mode after failed "c"', function()
screen:try_resize(50, 4)
command('set nomodifiable')
@@ -65,6 +68,25 @@ describe('ui mode_change event', function()
]], mode="normal"}
end)
-- oldtest: Test_mouse_shape_after_cancelling_gr()
it('is restored to Normal mode after cancelling "gr"', function()
feed('gr')
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
|
]], mode="replace"}
feed('<Esc>')
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
|
]], mode="normal"}
end)
it('works in insert mode', function()
feed('i')
screen:expect{grid=[[