mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user