Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(actions): Action handling of arguments #1908

Closed
wants to merge 2 commits into from

Conversation

badosu
Copy link
Collaborator

@badosu badosu commented Jan 20, 2025

Receiving the engine actions list and parsing it correctly.

Unfortunately there's quite a bit of inconsistency on such a largely unmaintained piece of code. I standardized it with a bit of a convention I saw frequently (2 spaces for indentation).

actionSet = keyReleaseActions
end

for _, action in ipairs(actions) do
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scope of this block for both these and the corresponding luaui file are the relevant sections


for _, action in ipairs(actions) do
local cmd = action["command"]
local extra = action["extra"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the 'extra' come from? I can't find anywhere that would set it https://github.com/search?q=repo%3Abeyond-all-reason%2Fspring+extra+lang%3Alua&type=code

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- If not supplied, delimiter defaults to whitespace.
-- Consecutive delimiters are treated as one.
-- string.split(csvText, ',') csvText:split(',')
local function ssplit(val, delimiter)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why rename the function (or why touch it at all if the only difference is an optional arg that never gets used)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, maybe unnecessary, although I'd have preferred to have a string.split defined instead of using this. Anyway, I'll revert it back with a more sensible name than MakeWords

@sprunk
Copy link
Collaborator

sprunk commented Jan 22, 2025

Would be good if the PR didn't randomly ruin git blame and formatting.

@badosu
Copy link
Collaborator Author

badosu commented Jan 22, 2025

Ok, I'll send a PR to fix formatting first, then I'll resend this one.

@badosu badosu closed this Jan 22, 2025
@badosu badosu deleted the badosu/fix-action-handling branch January 22, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants