diff options
author | luukvbaal <luukvbaal@gmail.com> | 2025-03-21 11:05:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-21 03:05:01 -0700 |
commit | c908c2560db891dcd152ed9d3cf10a36179bfed6 (patch) | |
tree | d2601a9fea7fd5d655306cb55b17c666b2f36e0e /test/functional/ui | |
parent | fa85543e3b6d4ff4643b460096dda315f145ef89 (diff) | |
download | rneovim-c908c2560db891dcd152ed9d3cf10a36179bfed6.tar.gz rneovim-c908c2560db891dcd152ed9d3cf10a36179bfed6.tar.bz2 rneovim-c908c2560db891dcd152ed9d3cf10a36179bfed6.zip |
fix(log): unify error messages for vim.ui_attach/decor providers #33005
Problem: Error messages that cause a vim.ui_attach() namespace to
detach are not visible in the message history. Decoration
provider and vim.ui_attach error messages are dissimilar.
Solution: Emit vim.ui_attach() errors as an actual message in addition
to logging it. Adjust error message format.
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index fe414783fd..ccc7841856 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -759,6 +759,7 @@ describe('decorations providers', function() end) it('errors gracefully', function() + screen:try_resize(65, screen._height) insert(mulholland) setup_provider [[ @@ -767,16 +768,16 @@ describe('decorations providers', function() end ]] - screen:expect{grid=[[ - {2:Error in decoration provider ns1.start:} | - {2:Error executing lua: [string "<nvim>"]:4}| - {2:: Foo} | - {2:stack traceback:} | - {2: [C]: in function 'error'} | - {2: [string "<nvim>"]:4: in function}| - {2: <[string "<nvim>"]:3>} | - {18:Press ENTER or type command to continue}^ | - ]]} + screen:expect([[ + // just to see if there was an accident | + {8: }| + {2:Error in decoration provider "start" (ns=ns1):} | + {2:Error executing lua: [string "<nvim>"]:4: Foo} | + {2:stack traceback:} | + {2: [C]: in function 'error'} | + {2: [string "<nvim>"]:4: in function <[string "<nvim>"]:3>} | + {18:Press ENTER or type command to continue}^ | + ]]) end) it('can add new providers during redraw #26652', function() |