diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-03-30 05:25:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 05:25:00 +0800 |
commit | a9665bb12cd8cbacbc6ef6df66c1989b0c6f9fcc (patch) | |
tree | 92ddfe2ac249914a9e5c7e490b275374ea41c12b /test/functional/ui/input_spec.lua | |
parent | 29aa08a09da088178bccc5ea29ac1c872bc4ab32 (diff) | |
download | rneovim-a9665bb12cd8cbacbc6ef6df66c1989b0c6f9fcc.tar.gz rneovim-a9665bb12cd8cbacbc6ef6df66c1989b0c6f9fcc.tar.bz2 rneovim-a9665bb12cd8cbacbc6ef6df66c1989b0c6f9fcc.zip |
fix(event-loop): duplicate display updating logic in vgetorpeek() (#17913)
Diffstat (limited to 'test/functional/ui/input_spec.lua')
-rw-r--r-- | test/functional/ui/input_spec.lua | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua index f5ae228b1e..9df7531016 100644 --- a/test/functional/ui/input_spec.lua +++ b/test/functional/ui/input_spec.lua @@ -320,3 +320,47 @@ describe("event processing and input", function() eq({'notification', 'stop', {}}, next_msg()) end) end) + +describe('display is updated', function() + local screen + before_each(function() + screen = Screen.new(60, 8) + screen:set_default_attr_ids({ + [1] = {bold = true, foreground = Screen.colors.Blue1}, -- NonText + [2] = {bold = true}, -- ModeMsg + }) + screen:attach() + end) + + it('in Insert mode after <Nop> mapping #17911', function() + command('imap <Plug>test <Nop>') + command('imap <F2> abc<CR><Plug>test') + feed('i<F2>') + screen:expect([[ + abc | + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {2:-- INSERT --} | + ]]) + end) + + it('in Insert mode after empty string <expr> mapping #17911', function() + command('imap <expr> <Plug>test ""') + command('imap <F2> abc<CR><Plug>test') + feed('i<F2>') + screen:expect([[ + abc | + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {2:-- INSERT --} | + ]]) + end) +end) |