@@ -75,7 +75,9 @@ function JobFinder:_find(prompt, process_result, process_complete)
|
||||
local entry
|
||||
if self.entry_maker then
|
||||
entry = self.entry_maker(line)
|
||||
if entry then
|
||||
entry.index = line_num
|
||||
end
|
||||
else
|
||||
entry = line
|
||||
end
|
||||
@@ -141,7 +143,9 @@ function DynamicFinder:_find(prompt, process_result, process_complete)
|
||||
for _, result in ipairs(results) do
|
||||
result_num = result_num + 1
|
||||
local entry = self.entry_maker(result)
|
||||
if entry then
|
||||
entry.index = result_num
|
||||
end
|
||||
if process_result(entry) then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -60,7 +60,9 @@ return function(opts)
|
||||
for line in stdout:iter(true) do
|
||||
line_num = line_num + 1
|
||||
local entry = entry_maker(line)
|
||||
if entry then
|
||||
entry.index = line_num
|
||||
end
|
||||
if process_result(entry) then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -71,7 +71,9 @@ return function(opts)
|
||||
end
|
||||
|
||||
local entry = entry_maker(line)
|
||||
if entry then
|
||||
entry.index = num_results
|
||||
end
|
||||
results[num_results] = entry
|
||||
process_result(entry)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user