@@ -95,6 +95,7 @@ def run(self, current_buffer_only = False):
9595 "labels" ,
9696 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
9797 )
98+ self .case_sensitivity = settings .get ("search_case_sensitivity" , True )
9899
99100 self .view_settings = settings .get ("view_settings" , [])
100101 self .view_values = get_views_settings (
@@ -164,7 +165,8 @@ def add_labels(self, regex):
164165 view .run_command ("add_ace_jump_labels" , {
165166 "regex" : regex ,
166167 "labels" : self .labels ,
167- "highlight" : self .highlight
168+ "highlight" : self .highlight ,
169+ "case_sensitive" : self .case_sensitivity
168170 })
169171 self .breakpoints .append (last_index )
170172 self .changed_views .append (view )
@@ -312,16 +314,16 @@ def run(self):
312314class AddAceJumpLabelsCommand (sublime_plugin .TextCommand ):
313315 """Command for adding labels to the views"""
314316
315- def run (self , edit , regex , labels , highlight ):
317+ def run (self , edit , regex , labels , highlight , case_sensitive ):
316318 global hints
317319
318- characters = self .find (regex , len (labels ))
320+ characters = self .find (regex , len (labels ), case_sensitive )
319321 self .add_labels (edit , characters , labels )
320322 self .view .add_regions ("ace_jump_hints" , characters , highlight )
321323
322324 hints = hints + characters
323325
324- def find (self , regex , max_labels ):
326+ def find (self , regex , max_labels , case_sensitive ):
325327 """Returns a list with all occurences matching the regex"""
326328
327329 global next_search , last_index
@@ -333,7 +335,7 @@ def find(self, regex, max_labels):
333335 last_search = visible_region .end ()
334336
335337 while (next_search < last_search and last_index < max_labels ):
336- word = self .view .find (regex , next_search )
338+ word = self .view .find (regex , next_search , 0 if case_sensitive else sublime . IGNORECASE )
337339
338340 if not word :
339341 break
0 commit comments