diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-15 23:02:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-15 23:02:48 +0800 |
commit | c70d90dbfdf67bb009d2976a5d0760be4010e533 (patch) | |
tree | f303d4ac87a0fe278f939b17b9470bb3a21ed4ae /test/functional/ui/mode_spec.lua | |
parent | 211c568e6452e62b119ac4b987ff47b9174ec9ad (diff) | |
download | rneovim-c70d90dbfdf67bb009d2976a5d0760be4010e533.tar.gz rneovim-c70d90dbfdf67bb009d2976a5d0760be4010e533.tar.bz2 rneovim-c70d90dbfdf67bb009d2976a5d0760be4010e533.zip |
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
Diffstat (limited to 'test/functional/ui/mode_spec.lua')
-rw-r--r-- | test/functional/ui/mode_spec.lua | 20 |
1 files changed, 20 insertions, 0 deletions
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() |