Remove poor 'undo' feat in highlight_view
@@ -303,26 +303,14 @@ def toggle_all_regions(view, show):
view.add_regions(key, regions, scope=scope, flags=flags)
-InvalidatedRegions = defaultdict(set)
-
-
class InvalidateEditedErrorController(sublime_plugin.EventListener):
# Called multiple times (once per buffer) but provided *view* is always
# the same, the primary one.
- def on_modified(self, view):
+ def on_modified_async(self, view):
active_view = State['active_view']
if view.buffer_id() == active_view.buffer_id():
invalidate_regions_under_cursor(active_view)
- def on_text_command(self, view, cmd, args):
- if cmd == 'undo':
- current = get_regions_keys(view)
- invalidated = InvalidatedRegions[view.id()]
- next = current | invalidated
- remember_region_keys(view, next)
-
- invalidated.clear()
-
@distinct_until_buffer_changed
def invalidate_regions_under_cursor(view):
@@ -342,7 +330,6 @@ def invalidate_regions_under_cursor(view):
for selection in selections
):
view.erase_regions(key)
- InvalidatedRegions[view.id()].add(key)
def prepare_protected_regions(view, errors):
