From c70d90dbfdf67bb009d2976a5d0760be4010e533 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 15 Nov 2022 23:02:48 +0800 Subject: 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) https://github.com/vim/vim/commit/cdeb65729d96c90320b9009e583ade305c396f29 --- test/functional/ui/mode_spec.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test') diff --git a/test/functional/ui/mode_spec.lua b/test/functional/ui/mode_spec.lua index 9390f268b3..cf4eb034e0 100644 --- a/test/functional/ui/mode_spec.lua +++ b/test/functional/ui/mode_spec.lua @@ -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() -- cgit