Skip to content

Commit

Permalink
Special characters are now properly escaped
Browse files Browse the repository at this point in the history
  • Loading branch information
ice9js committed Jun 29, 2015
1 parent 1f0ec10 commit 5825920
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ace_jump.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sublime, sublime_plugin
import re

LABELS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

Expand Down Expand Up @@ -157,7 +158,10 @@ def run(self, edit, char):
last_search = visible_region.end()

while (next_search < last_search and last_index < len(LABELS)):
word = self.view.find(search_regex.format(char), next_search)
word = self.view.find(
search_regex.format(re.escape(char)),
next_search
)

if not word:
break
Expand Down

0 comments on commit 5825920

Please sign in to comment.