diff options
author | ZyX <kp-pav@yandex.ru> | 2018-01-21 03:27:48 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2018-03-25 14:50:48 +0300 |
commit | 79b4b6fc86497fcb7b3f986e98cbf03f93b5b082 (patch) | |
tree | 2fcdd5af2b8bf6b05ddab5eb87fcf344ddbda5a2 /test/functional/ui/cmdline_highlight_spec.lua | |
parent | f8d2aef4f20887bb5a407b5a34cd5dc29fc6771c (diff) | |
download | rneovim-79b4b6fc86497fcb7b3f986e98cbf03f93b5b082.tar.gz rneovim-79b4b6fc86497fcb7b3f986e98cbf03f93b5b082.tar.bz2 rneovim-79b4b6fc86497fcb7b3f986e98cbf03f93b5b082.zip |
*: Make sure that !did_throw implies !current_exception
Fixes #7876
Diffstat (limited to 'test/functional/ui/cmdline_highlight_spec.lua')
-rw-r--r-- | test/functional/ui/cmdline_highlight_spec.lua | 16 |
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() |