Skip to content

Commit

Permalink
Simplify ansi undo command.
Browse files Browse the repository at this point in the history
  • Loading branch information
matt1003 committed Apr 29, 2016
1 parent cb47052 commit 8e4b180
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ansi.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,8 @@ def run(self):
view.set_read_only(False)
settings = sublime.load_settings("ansi.sublime-settings")
view.run_command("undo")
for bg in settings.get("ANSI_BG", []):
for fg in settings.get("ANSI_FG", []):
ansi_scope = "{0}{1}".format(fg['scope'], bg['scope'])
view.erase_regions(ansi_scope)
for ansi in ansi_definitions():
view.erase_regions(ansi.scope)

# restore the view's original scratch and read only settings
view.set_scratch(view.settings().get("ansi_scratch", False))
Expand Down

0 comments on commit 8e4b180

Please sign in to comment.