aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/ui_events.in.h
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2024-06-20 14:48:06 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2024-11-14 13:23:11 +0100
commitde48fbbd5f8800bd7f1909a6fb41e53e871cf74c (patch)
treeb394143235cc15259d6bf8b08729da73d5633ba4 /src/nvim/api/ui_events.in.h
parent7d771c3eeef5b4dca9ebc5ed6f7ca03f2b26b6bc (diff)
downloadrneovim-de48fbbd5f8800bd7f1909a6fb41e53e871cf74c.tar.gz
rneovim-de48fbbd5f8800bd7f1909a6fb41e53e871cf74c.tar.bz2
rneovim-de48fbbd5f8800bd7f1909a6fb41e53e871cf74c.zip
fix(messages)!: vim.ui_attach message callbacks are unsafe
Problem: Lua callbacks for "msg_show" events with vim.ui_attach() are executed when it is not safe. Solution: Disallow non-fast API calls for "msg_show" event callbacks. Automatically detach callback after excessive errors. Make sure fast APIs do not modify Nvim state.
Diffstat (limited to 'src/nvim/api/ui_events.in.h')
-rw-r--r--src/nvim/api/ui_events.in.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/ui_events.in.h b/src/nvim/api/ui_events.in.h
index 865e84ab91..0ed208fc1a 100644
--- a/src/nvim/api/ui_events.in.h
+++ b/src/nvim/api/ui_events.in.h
@@ -159,7 +159,7 @@ void wildmenu_hide(void)
FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY;
void msg_show(String kind, Array content, Boolean replace_last)
- FUNC_API_SINCE(6) FUNC_API_REMOTE_ONLY;
+ FUNC_API_SINCE(6) FUNC_API_FAST FUNC_API_REMOTE_ONLY;
void msg_clear(void)
FUNC_API_SINCE(6) FUNC_API_REMOTE_ONLY;
void msg_showcmd(Array content)