aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_highlight_spec.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-07-18 00:20:21 +0300
committerZyX <kp-pav@yandex.ru>2017-07-18 00:20:21 +0300
commit8a581b918b339b84b5abd80919416a84932eb13f (patch)
treeef7601643e29b5c42038de9cf2ab1cc8ec00c6cf /test/functional/ui/cmdline_highlight_spec.lua
parentcfb1d937a64fcec836fdf26d6ea67024aeafabeb (diff)
downloadrneovim-8a581b918b339b84b5abd80919416a84932eb13f.tar.gz
rneovim-8a581b918b339b84b5abd80919416a84932eb13f.tar.bz2
rneovim-8a581b918b339b84b5abd80919416a84932eb13f.zip
ex_getln: Check prev_prompt_errors before running redrawcmdline
Otherwise there will be infinite recursion and shortly a crash. Running redrawcmdline recursively occurs under color_cmdline_error label.
Diffstat (limited to 'test/functional/ui/cmdline_highlight_spec.lua')
-rw-r--r--test/functional/ui/cmdline_highlight_spec.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_highlight_spec.lua b/test/functional/ui/cmdline_highlight_spec.lua
index 6698ced596..e12961039a 100644
--- a/test/functional/ui/cmdline_highlight_spec.lua
+++ b/test/functional/ui/cmdline_highlight_spec.lua
@@ -527,6 +527,22 @@ describe('Ex commands coloring support', function()
eq('\nError detected while processing :\nE605: Exception not caught: 42',
meths.command_output('messages'))
end)
+ it('errors out when failing to get callback', function()
+ meths.set_var('Nvim_color_cmdline', 42)
+ feed(':#')
+ screen:expect([[
+ {EOB:~ }|
+ {EOB:~ }|
+ {EOB:~ }|
+ : |
+ {ERR:E5408: Unable to get Nvim_color_cmdline }|
+ {ERR:callback from g:: Vim:E6000: Argument is}|
+ {ERR: not a function or function name} |
+ :#^ |
+ ]])
+ end)
+end)
+describe('Expressions coloring support', function()
end)
-- TODO Specifically test for coloring in cmdline and expr modes