feat: add searching indicator (#1717) (#2637)

This commit is contained in:
Marskey
2023-08-08 01:10:24 +08:00
committed by GitHub
parent 96da5716e4
commit dc192faceb
4 changed files with 14 additions and 12 deletions

View File

@@ -353,24 +353,24 @@ append(
append(
"get_status_text",
function(self)
function(self, opts)
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
return ""
local status_icon = ""
if opts and not opts.completed then
status_icon = "*"
end
if xx == 0 and yy == 0 then
return status_icon
end
-- local status_icon
-- if opts.completed then
-- status_icon = "✔️"
-- else
-- status_icon = "*"
-- end
if ww == 0 then
return string.format("%s / %s", xx, yy)
return string.format("%s %s / %s", status_icon, xx, yy)
else
return string.format("%s / %s / %s", ww, xx, yy)
return string.format("%s %s / %s / %s", status_icon, ww, xx, yy)
end
end,
[[

View File

@@ -87,6 +87,7 @@ function JobFinder:_find(prompt, process_result, process_complete)
local opts = self:fn_command(prompt)
if not opts then
process_complete()
return
end

View File

@@ -33,6 +33,7 @@ return function(opts)
local job_opts = fn_command(prompt)
if not job_opts then
process_complete()
return
end

View File

@@ -789,7 +789,7 @@ function Picker:get_selection_row()
end
return self._selection_row
end
return self.max_results
return self:get_reset_row()
end
--- Move the current selection by `change` steps