diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-02-10 18:51:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-10 18:51:33 +0100 |
commit | 230f2ff381d7bced4d1e19bd1853ce75cbde797a (patch) | |
tree | 960d7910a9d60a36affcc7203decfbff82df8dcf /test/functional/ui/messages_spec.lua | |
parent | 971e0ca903fce05bd4853b129ed40dee7366956f (diff) | |
parent | dbf3c5d953ee9143494aa88b1aeb849d34ca64dd (diff) | |
download | rneovim-230f2ff381d7bced4d1e19bd1853ce75cbde797a.tar.gz rneovim-230f2ff381d7bced4d1e19bd1853ce75cbde797a.tar.bz2 rneovim-230f2ff381d7bced4d1e19bd1853ce75cbde797a.zip |
Merge pull request #13903 from glacambre/fix_prompt_for_number
Clear prompt_for_number messages
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r-- | test/functional/ui/messages_spec.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 5df4a1d533..1fe3a4128e 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -29,6 +29,7 @@ describe('ui/ext_messages', function() [6] = {bold = true, reverse = true}, [7] = {background = Screen.colors.Yellow}, [8] = {foreground = Screen.colors.Red}, + [9] = {special = Screen.colors.Red, undercurl = true}, }) end) after_each(function() @@ -795,6 +796,45 @@ describe('ui/ext_messages', function() pos = 9, }}} end) + + it('hides prompt_for_number messages', function() + command('set spell') + feed('ihelllo<esc>') + + feed('z=') + screen:expect{grid=[[ + {9:helllo} | + {1:~ }| + {1:~ }| + {1:~ }| + {1:^~ }| + ]], messages={ + {content = { { 'Change "helllo" to:\n 1 "Hello"\n 2 "Hallo"\n 3 "Helli"\nType number and <Enter> or click with mouse (empty cancels): ' } }, kind = ""} + }} + + feed('1') + screen:expect{grid=[[ + {9:helllo} | + {1:~ }| + {1:~ }| + {1:~ }| + {1:^~ }| + ]], messages={ + {content = { { 'Change "helllo" to:\n 1 "Hello"\n 2 "Hallo"\n 3 "Helli"\nType number and <Enter> or click with mouse (empty cancels): ' } }, kind = ""}, + { content = { { "1" } }, kind = "" } + }} + + feed('<cr>') + screen:expect{grid=[[ + ^Hello | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ]]} + + end) + end) describe('ui/builtin messages', function() |