Skip to content

Fix crash with file globbing matching micro option names#4044

Merged
JoeKar merged 2 commits into
micro-editor:masterfrom
JoeKar:fix/crash-glob
Mar 22, 2026
Merged

Fix crash with file globbing matching micro option names#4044
JoeKar merged 2 commits into
micro-editor:masterfrom
JoeKar:fix/crash-glob

Conversation

@JoeKar

@JoeKar JoeKar commented Mar 14, 2026

Copy link
Copy Markdown
Member

The background is documented in: #4042 (comment)

Fixes #4042
Closes #4043

@JoeKar

JoeKar commented Mar 15, 2026

Copy link
Copy Markdown
Member Author

Closed for better approach.

@JoeKar JoeKar closed this Mar 15, 2026
@JoeKar

JoeKar commented Mar 16, 2026

Copy link
Copy Markdown
Member Author

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
Comment thread internal/config/settings.go
Comment thread runtime/help/options.md
Comment thread internal/config/settings.go
Comment thread internal/config/settings.go
Comment thread runtime/help/options.md
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>
Comment thread runtime/help/options.md Outdated
This gives the advantage to differentiate internal options from user defined
file globs with the same name.
@JoeKar JoeKar merged commit d976b3f into micro-editor:master Mar 22, 2026
6 checks passed
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