From 4a90879c88658a3dd09fdd4fbe0cf5afbd1d7c7b Mon Sep 17 00:00:00 2001 From: William Boman Date: Fri, 2 Dec 2022 19:04:15 +0100 Subject: feat(ui): change log line number formatting in tail output (#718) I think this has better affordance and better indicates that the log is truncated to a single line and can actually be expanded. --- lua/mason/ui/components/main/package_list.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/mason/ui/components/main/package_list.lua b/lua/mason/ui/components/main/package_list.lua index 69e3748d..5a91d9df 100644 --- a/lua/mason/ui/components/main/package_list.lua +++ b/lua/mason/ui/components/main/package_list.lua @@ -196,7 +196,11 @@ local function InstallingPackageComponent(pkg, state) local pkg_state = state.packages.states[pkg.name] local current_state = pkg_state.is_terminated and p.Comment " (cancelling)" or p.none "" local tail = pkg_state.short_tailed_output - and ("▶ (#" .. #pkg_state.tailed_output .. ") " .. pkg_state.short_tailed_output) + and ("▶ # [%d/%d] %s"):format( + #pkg_state.tailed_output, + #pkg_state.tailed_output, + pkg_state.short_tailed_output + ) or "" return Ui.Node { Ui.HlTextNode { -- cgit v1.2.3-70-g09d2