vim-patch:9.0.0884: mouse shape remains in op-pending mode after failed change (#21066)

Problem:    Mouse shape remains in op-pending mode after failed change.
Solution:   Reset finish_op and restore it. (closes vim/vim#11545)

cdeb65729d
This commit is contained in:
zeertzjq
2022-11-15 23:02:48 +08:00
committed by GitHub
parent 211c568e64
commit c70d90dbfd
3 changed files with 61 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ describe('ui mode_change event', function()
[1] = {bold=true, reverse=true},
[2] = {bold=true},
[3] = {reverse=true},
[4] = {background=Screen.colors.Red, foreground=Screen.colors.White}, -- ErrorMsg
})
end)
@@ -43,6 +44,25 @@ describe('ui mode_change event', function()
{0:~ }|
|
]], mode="normal"}
screen:try_resize(50, 4)
command('set nomodifiable')
feed('c')
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
|
]], mode="operator"}
feed('c')
screen:expect{grid=[[
^ |
{0:~ }|
{0:~ }|
{4:E21: Cannot make changes, 'modifiable' is off} |
]], mode="normal"}
end)
it('works in insert mode', function()