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 /src/nvim/lua/executor.h | |
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 'src/nvim/lua/executor.h')
-rw-r--r-- | src/nvim/lua/executor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/lua/executor.h b/src/nvim/lua/executor.h index 9ff869e221..557c0b025e 100644 --- a/src/nvim/lua/executor.h +++ b/src/nvim/lua/executor.h @@ -44,6 +44,9 @@ typedef enum { kRetLuaref, ///< return value becomes a single Luaref, regardless of type (except NIL) } LuaRetMode; +/// Maximum number of errors in vim.ui_attach() and decor provider callbacks. +enum { CB_MAX_ERROR = 3, }; + /// To use with kRetNilBool for quick truthiness check #define LUARET_TRUTHY(res) ((res).type == kObjectTypeBoolean && (res).data.boolean == true) |