Skip to content
Browse files

Fixed cmd/env completion so { is not seen as part of the cmd/env

  • Loading branch information...
1 parent 2dbbd71 commit 87c45273b73ee4840b3a309a0a8318c8259912b9 @msiniscalchi msiniscalchi committed Oct 21, 2012
Showing with 6 additions and 3 deletions.
  1. +1 −1 latexCommand.py
  2. +1 −1 latexEnvironment.py
  3. +4 −1 messages/7.txt
View
2 latexCommand.py
@@ -15,7 +15,7 @@ def run(self, edit, **args):
point = view.sel()[0].b
line = view.substr(sublime.Region(view.line(point).a, point))
line = line[::-1]
- rex = re.compile(r"(\S*)\s?")
+ rex = re.compile(r"([^\s\{]*)\s?\{?")
expr = re.match(rex, line)
if expr:
command = expr.group(1)[::-1]
View
2 latexEnvironment.py
@@ -15,7 +15,7 @@ def run(self, edit, **args):
point = view.sel()[0].b
line = view.substr(sublime.Region(view.line(point).a, point))
line = line[::-1]
- rex = re.compile(r"(\S*)\s?")
+ rex = re.compile(r"([^\s\{]*)\s?\{?")
expr = re.match(rex, line)
if expr:
environment = expr.group(1)[::-1]
View
5 messages/7.txt
@@ -8,9 +8,12 @@ New features:
Bugs fixed:
-- Robustified command and environment completion (C-l,c and C-l,e) so starred versions
+- Robustified command and environment insertion (C-l,c and C-l,e) so starred versions
of commands/environments are OK
+- Fixed command/env insertion (C-l,c and C-l,e) so { is recognized as a cmd/env boundary
+ [fixing e.g. {color} --> {\\color{}} as the { was intepreted as part of the cmd]
+
- Robustified makePDF.py; now it should always fail gracefully when it cannot parse tex file names,
and kindly ask the user to report the bug on GitHub :-) Note TODO: better filename regexp!

0 comments on commit 87c4527

Please sign in to comment.
Something went wrong with that request. Please try again.