mirror of
https://github.com/neovim/neovim.git
synced 2026-07-16 22:21:30 +00:00
fix(messages): "progress" kind for busy messages #39280
Problem: The "Scanning:" completion, bufwrite, and indent (there may be
more) messages which indicate progress can use the "progress" kind
for their msg_show event. Indent message does not have a kind.
Solution: Emit these messages with the "progress" kind. Set the message id
to the replaced kind so that a UI knows to replace it (and to provide
a migration path in case a UI was distinguishing these messages for
whatever reason).
This commit is contained in:
@@ -1453,6 +1453,12 @@ function Screen:_handle_msg_show(kind, chunks, replace_last, history, append, id
|
||||
if not replace_last or pos == 0 then
|
||||
pos = pos + 1
|
||||
end
|
||||
for i, msg in pairs(self.messages) do
|
||||
if id ~= -1 and msg.id == id then
|
||||
pos = i
|
||||
break
|
||||
end
|
||||
end
|
||||
self.messages[pos] = {
|
||||
kind = kind,
|
||||
content = chunks,
|
||||
|
||||
Reference in New Issue
Block a user