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

Fix errors with sublime-color-scheme format in inline diff #1030

Merged
merged 2 commits into from
Oct 30, 2018
Merged

Fix errors with sublime-color-scheme format in inline diff #1030

merged 2 commits into from
Oct 30, 2018

Conversation

deathaxe
Copy link
Contributor

@deathaxe deathaxe commented Oct 27, 2018

Fixes some issues (#1029) with the sublime-color-scheme format. For details refer to the commit messages, please.

I started fixing at the dev branch. If you feel this to be a hotfix, feel free to move it to master.

Fixes #1029

All sublime JSON files can contain comments and the last item of a
dictionary or list is allowed to have a trailing comma. This makes
them invalid JSON files, which causes python's json library to raise
parse errors.

Hence this commit replaces the
 - json.loads with sublime.decode_value()
 - json.dumps with sublime.encode_value()

and removes the obsolete json import.
While fixing #1029 it was revealed that the generated color scheme was
not applied to the inline diff view at all.

Hence this commit modifies the `apply_new_theme()` method to ensure
only the basename of the generated scheme is set to the view's
"color_scheme" setting.
Copy link
Collaborator

@randy3k randy3k left a comment

Choose a reason for hiding this comment

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

LGTM (not test locally though)

@stoivo
Copy link
Member

stoivo commented Oct 30, 2018

Thanks @deathaxe

@stoivo stoivo merged commit ab0ee2e into timbrel:dev Oct 30, 2018
@stoivo stoivo deleted the pr/fix-1029 branch October 30, 2018 22:56
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.

3 participants