Permalink
Browse files

fixed issue with icons in new version of ST3

  • Loading branch information...
1 parent 987cd0e commit 87a24218e18de5da36be28996f3d0e10234f17fd @gornostal committed Feb 28, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 Modific.py
View
@@ -8,6 +8,8 @@
import re
+IS_ST3 = sublime.version().startswith('3')
+
def get_settings():
return sublime.load_settings("Modific.sublime-settings")
@@ -415,7 +417,10 @@ def hl_lines(self, lines, hl_key):
icon = self.settings.get('region_icon') or 'modific'
if icon == 'modific':
- icon = '../Modific/icons/' + hl_key
+ if IS_ST3:
+ icon = 'Packages/Modific/icons/' + hl_key + '.png'
+ else:
+ icon = '../Modific/icons/' + hl_key
points = [self.view.text_point(l - 1, 0) for l in lines]
regions = [sublime.Region(p, p) for p in points]
self.view.add_regions(hl_key, regions, "markup.%s.diff" % hl_key,

0 comments on commit 87a2421

Please sign in to comment.