Skip to content

Fix crash with file globbing matching micro option names#4044

Open
JoeKar wants to merge 2 commits intomicro-editor:masterfrom
JoeKar:fix/crash-glob
Open

Fix crash with file globbing matching micro option names#4044
JoeKar wants to merge 2 commits intomicro-editor:masterfrom
JoeKar:fix/crash-glob

Conversation

@JoeKar
Copy link
Member

@JoeKar JoeKar commented Mar 14, 2026

The background is documented in: #4042 (comment)

Fixes #4042
Closes #4043

@JoeKar
Copy link
Member Author

JoeKar commented Mar 15, 2026

Closed for better approach.

@JoeKar JoeKar closed this Mar 15, 2026
@JoeKar
Copy link
Member Author

JoeKar commented Mar 16, 2026

Reopen due to #4042 (comment)
We might continue, what was already started.

@JoeKar JoeKar reopened this Mar 16, 2026
@JoeKar JoeKar mentioned this pull request Mar 16, 2026
Map-typed values in the parsedSettings map do not represent settings for
individual options, they represent maps of settings for multiple options for
the given glob or ft: pattern, and their keys are not option names, they are
glob and ft: patterns. So do not expose them to the callers of ParsedSettings(),
to prevent the callers from mistakenly treating those patterns as option names,
with unpredicted consequences.

Co-authored-by: Dmytro Maluka <dmitrymaluka@gmail.com>
This gives the advantage to differentiate internal options from user defined
file globs with the same name.
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.

Crash when saving

2 participants