Repository navigation
Remove override: comment out lines with notes instead of deleting them - #6
Merged
Merged
Conversation
Per tester feedback, deleting a set line also deleted the user's trailing
comment (eg. a note to self). Now:
- Remove override deletes a set line only if it has no trailing comment;
otherwise it comments the line out ("// set ..."), keeping the note.
- Applying a value with no active set line, but a commented-out one above
the cut line, uncomments that line and updates its value.
- Commented-out set lines in User.cfg / VR.cfg are listed as params, so a
param not in Falcon BMS.cfg doesn't vanish from the list once removed.
The detail pane shows "(none)" for missing values, and notes when a
commented-out line exists.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaEsnLMDyw72GZ8a6ZxAGq
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.
This fixes a data-loss bug reported by testers. Remove override deleted the whole
setline, so a note the user had written on that line was deleted with it, e.g.Changes
Remove override (
CfgDocument.RemoveValue)// set g_bSomeExperimentalFeature 1 // NOTE: remember to turn this off before multiplayer sessionApply (
CfgDocument.SetValue)setline but a commented-out one exists above the cut line, that line is uncommented and only its value is replaced. Remove followed by Apply therefore gives back the original line unchanged.Parsing and the list (
CfgDocument.ParseLine,ConfigSet)CommentedSet: a comment marker (//or#) followed by a validsetstatement. It is checked before category headers, so// set g_bFoo 1 //isn't mistaken for a category.Testing
//comment is deleted.//and#lines above the cut line, and leaves commented lines below it alone.// set ... //is parsed as a commented-out param, not a category.Generated by Claude Code