Fix crash with file globbing matching micro option names#4044
Open
JoeKar wants to merge 2 commits intomicro-editor:masterfrom
Open
Fix crash with file globbing matching micro option names#4044JoeKar wants to merge 2 commits intomicro-editor:masterfrom
JoeKar wants to merge 2 commits intomicro-editor:masterfrom
Conversation
Member
Author
|
Closed for better approach. |
Member
Author
|
Reopen due to #4042 (comment) |
dmaluka
reviewed
Mar 17, 2026
dmaluka
reviewed
Mar 17, 2026
dmaluka
reviewed
Mar 18, 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.
dmaluka
reviewed
Mar 19, 2026
| } | ||
| ``` | ||
|
|
||
| The old non-prefixed glob format is still supported (but internally converted): |
Collaborator
There was a problem hiding this comment.
This wording sounds like the reader already knows what "old non-prefixed format" this is referring to. As always, put yourself in a position of a reader who is not already familiar with the stuff we are documenting.
And what exactly is the reader supposed to do with "but internally converted"?
...How about:
You can also omit the `glob:` prefix before globs:
...
But it is generally more recommended to use the `glob:` prefix, as it avoids
potential conflicts with option names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The background is documented in: #4042 (comment)
Fixes #4042
Closes #4043