Rename v to entry in add_entry loop
This commit is contained in:
parent
ec5ec642c3
commit
30911a3959
|
@ -314,34 +314,34 @@ local function menulist_update(scr)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add the applications according to their name and cmdline
|
-- Add the applications according to their name and cmdline
|
||||||
local add_entry = function(v)
|
local add_entry = function(entry)
|
||||||
v.focused = false
|
entry.focused = false
|
||||||
if not current_category or v.category == current_category then
|
if not current_category or entry.category == current_category then
|
||||||
|
|
||||||
-- check if the query matches either the name or the commandline
|
-- check if the query matches either the name or the commandline
|
||||||
-- of some entry
|
-- of some entry
|
||||||
if string.match(v.name, pattern)
|
if string.match(entry.name, pattern)
|
||||||
or string.match(v.cmdline, pattern) then
|
or string.match(entry.cmdline, pattern) then
|
||||||
|
|
||||||
v.weight = 0
|
entry.weight = 0
|
||||||
v.prio = PRIO_NONE
|
entry.prio = PRIO_NONE
|
||||||
|
|
||||||
-- get use count from count_table if present
|
-- get use count from count_table if present
|
||||||
-- and use it as weight
|
-- and use it as weight
|
||||||
if string.len(pattern) > 0 and count_table[v.name] ~= nil then
|
if string.len(pattern) > 0 and count_table[entry.name] ~= nil then
|
||||||
v.weight = tonumber(count_table[v.name])
|
entry.weight = tonumber(count_table[entry.name])
|
||||||
end
|
end
|
||||||
|
|
||||||
-- check for prefix match
|
-- check for prefix match
|
||||||
if string.match(v.name, "^" .. pattern)
|
if string.match(entry.name, "^" .. pattern)
|
||||||
or string.match(v.cmdline, "^" .. pattern) then
|
or string.match(entry.cmdline, "^" .. pattern) then
|
||||||
-- increase default priority
|
-- increase default priority
|
||||||
v.prio = PRIO_NONE + 1
|
entry.prio = PRIO_NONE + 1
|
||||||
else
|
else
|
||||||
v.prio = PRIO_NONE
|
entry.prio = PRIO_NONE
|
||||||
end
|
end
|
||||||
|
|
||||||
table.insert (command_list, v)
|
table.insert (command_list, entry)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue