Make LineLens.configChangedHandler update the config directly, instead of through a ref #1929
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.
WHAT
Not sure if this is the right thing to do, but:
I was looking at #1924 about the missing leading space in the lens text.
Whilst testing, I tried changing the user setting for the lens prefix from ' // ' to a custom value (e.g. ' ** ') and noticed that that wasn't picked up either.
It looks to me like the intent is for the 'default' value (the one changed in #1928) to be overwritten be a configuration specifed value that gets loaded in the
configChangedHandler
call made from theactivate
event.However - when I tried debugging it it looked like the updated
prefix
value wasn't peristed into theconfig
member ofLineLens
- it looked to always be using the local default.I'm not sure what's causing that to go wrong, but - I'm not sure why the config object is passed into
configChangedHandler
by reference and from a bit of testing it seems that just making it update theconfig
member directly causes the whole thing to correctly pick up a user specified prefix string.So - here it is for any comments from anyone who knows more about how it's supposed to work.
WHY
refs #1924
HOW
Update the
config
member ofLineLens
directly instead of through a reference.