fix(messages): dangling progress-messages #41222

Problem:
Some builtin features emit progress-messages which never "complete".
- On failure, `:write` does not complete the progress-msg it started.
- ins-completion never ends its "Scanning..." message.

Solution:
- `buf_write()` emits "failed" status on failure.
- `ins_compl_stop()` ends the completion one.
This commit is contained in:
Justin M. Keyes authored and GitHub committed 2026-08-07 16:10:02 -04:00
1 parent 8773f85473
commit 33a688f9fe
8 files changed
+108 -35

No files matched your search

+4
View File
@@ -891,6 +891,10 @@ Create or update a progress-message by calling |nvim_echo()| with
`nvim_echo`. You can specify the id when calling `nvim_echo` to update an
existing progress-message.
Note: To avoid a "dangling" progress-message, always emit a non-"running"
`status`, when your task is done; otherwise consumers (including Nvim itself)
tracking the task by its message-id cannot know when the task is done.
Events: ~
• msg_show |ui-messages| event is fired for ext-ui upon creation/update of
a progress-message