aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_highlight_spec.lua
diff options
context:
space:
mode:
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 ffb6a26aef..f9cec903a0 100644
--- a/test/functional/ui/cmdline_highlight_spec.lua
+++ b/test/functional/ui/cmdline_highlight_spec.lua
@@ -737,6 +737,22 @@ describe('Command-line coloring', function()
feed('<CR><CR>')
eq('', meths.get_var('out'))
end)
+ it('does not crash when callback has caught not-a-editor-command exception',
+ function()
+ source([[
+ function CaughtExc(cmdline) abort
+ try
+ gibberish
+ catch
+ " Do nothing
+ endtry
+ return []
+ endfunction
+ ]])
+ set_color_cb('CaughtExc')
+ start_prompt('1')
+ eq(1, meths.eval('1'))
+ end)
end)
describe('Ex commands coloring support', function()
it('works', function()