Skip to content

Commit cb8fc90

Browse files
authored
Merge pull request #1350 from myk002/myk_repeat_util_api
use the new repeat-util API for querying
2 parents 0a5380c + ecabf51 commit cb8fc90

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

internal/control-panel/common.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function get_enabled_map()
7373
end
7474
end
7575
-- repeat entries override tool names for control-panel
76-
for munged_name in pairs(repeatUtil.repeating) do
76+
for _,munged_name in ipairs(repeatUtil.listScheduled()) do
7777
local name = unmunge_repeat_name(munged_name)
7878
if name then
7979
enabled_map[name] = true
@@ -118,7 +118,7 @@ local function persist_repeats()
118118
local cp_repeats = {}
119119
for _, data in ipairs(registry.COMMANDS_BY_IDX) do
120120
if data.mode == 'repeat' then
121-
if repeatUtil.repeating[munge_repeat_name(data.command)] then
121+
if repeatUtil.isScheduled(munge_repeat_name(data.command)) then
122122
cp_repeats[data.command] = true
123123
else
124124
cp_repeats[data.command] = false

repeat.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ elseif args.command then
4646
end
4747

4848
if args.list then
49-
for k in pairs(repeatUtil.repeating) do
50-
print(k)
49+
for _,name in ipairs(repeatUtil.listScheduled()) do
50+
print(name)
5151
end
5252
return
5353
end

0 commit comments

Comments
 (0)