Skip to content

Commit

Permalink
Merge pull request #11 from vihangm/master
Browse files Browse the repository at this point in the history
Make ScrollOffset compatible with ST3
  • Loading branch information
adzenith committed Mar 4, 2015
2 parents 2573fa6 + a98acf1 commit 163d17c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
38 changes: 38 additions & 0 deletions Main.sublime-menu
@@ -0,0 +1,38 @@
[
{
"caption": "Preferences",
"id": "preferences",
"mnemonic": "n",
"children":
[
{
"caption": "Package Settings",
"id": "package-settings",
"mnemonic": "P",
"children":
[
{
"caption": "ScrollOffset",
"children":
[
{
"caption": "Settings – Default",
"command": "open_file", "args":
{
"file": "${packages}/ScrollOffset/ScrollOffset.sublime-settings"
}
},
{
"caption": "Settings – User",
"command": "open_file", "args":
{
"file": "${packages}/User/ScrollOffset.sublime-settings"
}
}
]
}
]
}
]
}
]
@@ -1,6 +1,5 @@
{
"vertical_margin" : 5,
"horizontal_margin" : 15,

"show_debug_guides" : false
}
4 changes: 3 additions & 1 deletion scroll_offset.py
Expand Up @@ -9,6 +9,8 @@
"""

import sublime, sublime_plugin
# Python 3 compatibility
from functools import reduce
try:
import mouse_event_listener
except:
Expand Down Expand Up @@ -40,7 +42,7 @@ def on_selection_modified(self, view):
line_height = view.line_height()
em_width = view.em_width()

settings = sublime.load_settings('Scroll Offset.sublime-settings')
settings = sublime.load_settings('ScrollOffset.sublime-settings')
BOTTOM_OFFSET = settings.get("bottom_margin")
TOP_OFFSET = settings.get("top_margin")
VERTICAL_OFFSET = settings.get("vertical_margin")
Expand Down

0 comments on commit 163d17c

Please sign in to comment.