Permalink
Browse files

Internal: specify GitSavvy settings under root node

  • Loading branch information...
randy3k committed Apr 7, 2018
1 parent 21ca799 commit 066b126c5dcb4af0ee90dda2e9b259c60caa6e5e
Showing with 9 additions and 14 deletions.
  1. +3 −3 GitSavvy.sublime-project
  2. +2 −4 common/global_events.py
  3. +2 −2 core/settings.py
  4. +2 −5 docs/README.md
View
@@ -1,4 +1,7 @@
{
"GitSavvy":
{
},
"build_systems":
[
{
@@ -23,9 +26,6 @@
],
"settings":
{
"GitSavvy":
{
},
"rulers":
[
100,
View
@@ -77,10 +77,8 @@ def run(self):
if project_data is None:
project_data = {}
if "settings" not in project_data:
project_data["settings"] = {"GitSavvy": {}}
if "GitSavvy" not in project_data["settings"]:
project_data["settings"]["GitSavvy"] = {}
if "GitSavvy" not in project_data:
project_data["GitSavvy"] = {}
self.window.set_project_data(project_data)
View
@@ -8,8 +8,8 @@ def __init__(self, parent=None):
def get(self, key, default=None):
project_data = sublime.active_window().project_data()
if project_data and "settings" in project_data and "GitSavvy" in project_data["settings"]:
project_savvy_settings = project_data["settings"]["GitSavvy"]
if project_data and "GitSavvy" in project_data:
project_savvy_settings = project_data["GitSavvy"]
if key in project_savvy_settings:
return project_savvy_settings.get(key)
return self.global_settings.get(key, default)
View
@@ -190,12 +190,9 @@ To open the GitSavvy settings, simply run the `Preferences: GitSavvy Settings` c
```
{
"settings":
"GitSavvy":
{
"GitSavvy":
{
// GitSavvy settings go here
}
// GitSavvy settings go here
}
}
```

0 comments on commit 066b126

Please sign in to comment.