5
5
except ValueError :
6
6
from view_collection import ViewCollection
7
7
8
+ ST3 = int (sublime .version ()) >= 3000
9
+
10
+ _show_in_minimap = False
8
11
9
12
def plugin_loaded ():
10
13
"""
@@ -19,6 +22,9 @@ def plugin_loaded():
19
22
if not exists (icon_path ):
20
23
makedirs (icon_path )
21
24
25
+ settings = sublime .load_settings ('VcsGutter.sublime-settings' )
26
+ global _show_in_minimap
27
+ _show_in_minimap = settings .get ('show_in_miminap' , False )
22
28
23
29
class VcsGutterCommand (sublime_plugin .WindowCommand ):
24
30
region_names = ['deleted_top' , 'deleted_bottom' ,
@@ -44,7 +50,7 @@ def lines_to_regions(self, lines):
44
50
regions = []
45
51
for line in lines :
46
52
position = self .view .text_point (line - 1 , 0 )
47
- region = sublime .Region (position , position )
53
+ region = sublime .Region (position , position + 1 )
48
54
regions .append (region )
49
55
return regions
50
56
@@ -79,4 +85,8 @@ def bind_icons(self, event, lines):
79
85
event_scope = 'deleted'
80
86
scope = 'markup.%s.vcs_gutter' % event_scope
81
87
icon = self .icon_path (event )
82
- self .view .add_regions ('vcs_gutter_%s' % event , regions , scope , icon )
88
+ if ST3 and _show_in_minimap :
89
+ flags = sublime .DRAW_NO_FILL | sublime .DRAW_NO_OUTLINE
90
+ else :
91
+ flags = sublime .HIDDEN
92
+ self .view .add_regions ('vcs_gutter_%s' % event , regions , scope , icon , flags )
0 commit comments