From e8ccd47c4f748a0db5c84c84e2bc7f518cb94cea Mon Sep 17 00:00:00 2001 From: Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> Date: Fri, 14 Jan 2022 17:02:24 +0000 Subject: feat: adds multiselect counter in prompt status_text (#1614) --- lua/telescope/config.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lua/telescope/config.lua') diff --git a/lua/telescope/config.lua b/lua/telescope/config.lua index 5bf8602..9d85305 100644 --- a/lua/telescope/config.lua +++ b/lua/telescope/config.lua @@ -363,6 +363,7 @@ append( append( "get_status_text", function(self) + local ww = #(self:get_multi_selection()) local xx = (self.stats.processed or 0) - (self.stats.filtered or 0) local yy = self.stats.processed or 0 if xx == 0 and yy == 0 then @@ -375,7 +376,11 @@ append( -- else -- status_icon = "*" -- end - return string.format("%s / %s", xx, yy) + if ww == 0 then + return string.format("%s / %s", xx, yy) + else + return string.format("%s / %s / %s", ww, xx, yy) + end end, [[ A function that determines what the virtual text looks like. -- cgit v1.2.3