Skip to content
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

Merged
merged 5 commits into from
Jan 4, 2023

Conversation

derekparker
Copy link
Member

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

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.
@derekparker
Copy link
Member Author

@thockin can you test this out?

Copy link
Contributor

@thockin thockin left a 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)
Copy link
Contributor

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 :)

Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aarzilli aarzilli merged commit 9230a97 into go-delve:master Jan 4, 2023
@derekparker derekparker deleted the fix-terminal-color-config branch January 4, 2023 16:48
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.

can't figure out source-list-* configs
3 participants