From 79b4b6fc86497fcb7b3f986e98cbf03f93b5b082 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 21 Jan 2018 03:27:48 +0300 Subject: *: Make sure that !did_throw implies !current_exception Fixes #7876 --- test/functional/ui/cmdline_highlight_spec.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/functional/ui') 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('') 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() -- cgit