feat(progress): better default format + history sync #35533

Problem:
The default progress message doesn't account for
message-status. Also, the title and percent sections don't get written
to history. And progress percent is hard to find with variable length messages.

Solution:
Apply highlighting on Title based on status. And sync the formated msg
in history too. Also updates the default progress message format to
{title}: {percent}% msg
This commit is contained in:
Shadman
2025-09-02 04:13:21 +06:00
committed by GitHub
parent 4cda52a5d1
commit 8a12a01466
10 changed files with 211 additions and 34 deletions

View File

@@ -994,7 +994,8 @@ static void nlua_print_event(void **argv)
HlMessage msg = KV_INITIAL_VALUE;
HlMessageChunk chunk = { { .data = argv[0], .size = (size_t)(intptr_t)argv[1] - 1 }, 0 };
kv_push(msg, chunk);
msg_multihl(INTEGER_OBJ(0), msg, "lua_print", true, false, NULL);
bool needs_clear = false;
msg_multihl(INTEGER_OBJ(0), msg, "lua_print", true, false, NULL, &needs_clear);
}
/// Print as a Vim message