Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Source/RecursiveBinder.spoon/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,15 @@ local function showHelper(keyFuncNameTable)
local separator = '' -- first loop doesn't need to add a separator, because it is in the very front.
local lastLine = ''
local count = 0
for keyName, funcName in pairs(keyFuncNameTable) do
local keysSorted = {}
for k, v in pairs(keyFuncNameTable) do
table.insert(keysSorted, {key = k, value = v})
end
table.sort(keysSorted, function(a, b) return a.value < b.value end)

for i = 1, #keysSorted do
local keyName = keysSorted[i].key
local funcName = keysSorted[i].value
local newEntry = keyName..' → '..funcName
-- make sure each entry is of the same length
if string.len(newEntry) > obj.helperEntryLengthInChar then
Expand Down