mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
fix(messages): "list_cmd" kind for :command, :version (#34529)
Problem: No ext_messages kind for the :command, :version commands. :version is emitted as multiple events. Solution: Assign them the "list_cmd" kind. Use `msg_put*` to properly format the message as a single event.
This commit is contained in:
@@ -2557,7 +2557,9 @@ void ex_version(exarg_T *eap)
|
||||
{
|
||||
// Ignore a ":version 9.99" command.
|
||||
if (*eap->arg == NUL) {
|
||||
msg_putchar('\n');
|
||||
if (!ui_has(kUIMessages)) {
|
||||
msg_putchar('\n');
|
||||
}
|
||||
list_version();
|
||||
}
|
||||
}
|
||||
@@ -2671,19 +2673,23 @@ void list_lua_version(void)
|
||||
(Array)ARRAY_DICT_INIT, kRetObject, NULL, &err);
|
||||
assert(!ERROR_SET(&err));
|
||||
assert(ret.type == kObjectTypeString);
|
||||
msg(ret.data.string.data, 0);
|
||||
msg_puts(ret.data.string.data);
|
||||
api_free_object(ret);
|
||||
}
|
||||
|
||||
void list_version(void)
|
||||
{
|
||||
msg(longVersion, 0);
|
||||
msg(version_buildtype, 0);
|
||||
msg_ext_set_kind("list_cmd");
|
||||
msg_puts(longVersion);
|
||||
msg_putchar('\n');
|
||||
msg_puts(version_buildtype);
|
||||
msg_putchar('\n');
|
||||
list_lua_version();
|
||||
|
||||
if (p_verbose > 0) {
|
||||
#ifndef NDEBUG
|
||||
msg(version_cflags, 0);
|
||||
msg_putchar('\n');
|
||||
msg_puts(version_cflags);
|
||||
#endif
|
||||
version_msg("\n\n");
|
||||
|
||||
|
Reference in New Issue
Block a user