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