-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/terminal: fix handling list colors via config #3240
pkg/terminal: fix handling list colors via config #3240
Conversation
Parsing the source list color when set during a Delve debug session resulted in unexpected errors. Additionally the changes were not reflected in the current session, forcing the user to save the config and start a new session. This patch fixes those issues.
@thockin can you test this out? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works for me
@@ -84,7 +84,28 @@ func ConfigureSetSimple(rest string, cfgname string, field reflect.Value) error | |||
v := rest == "true" | |||
return reflect.ValueOf(&v), nil | |||
case reflect.String: | |||
unquoted, err := strconv.Unquote(rest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you want to handle cases like "forgot the last quote
?
My PR handles it as an error (clearly they meant to specify a quoted string). This PR will treat it as a literal (which is more back-compatible, but less correct.
You decide - the rest LGTM :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Parsing the source list color when set during a Delve debug session resulted in unexpected errors. Additionally the changes were not reflected in the current session, forcing the user to save the config and start a new session. This patch fixes those issues.
Fixes #3238