Skip to content

Commit

Permalink
fix errors on new tab opening
Browse files Browse the repository at this point in the history
  • Loading branch information
srusskih committed Dec 29, 2012
1 parent f8a63c5 commit d908ad9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions SublimeBlockCursor.py
Expand Up @@ -19,9 +19,14 @@ def show_block_cursor(self, view):
view.erase_regions('SublimeBlockCursorListener')

def on_selection_modified(self, view):
if view.settings().get('is_widget') or not("Vintage" in view.settings().get('ignored_packages') or view.settings().get('command_mode')):
is_widget = view.settings().get('is_widget')
is_vintage_mode = "Vintage" not in view.settings().get('ignored_packages', [])
command_mode = view.settings().get('command_mode')

if is_widget or (is_vintage_mode and not command_mode):
view.erase_regions('SublimeBlockCursorListener')
return

self.show_block_cursor(view)

def on_deactivated(self, view):
Expand All @@ -35,4 +40,4 @@ def on_activated(self, view):
self.current_view = view

def on_command_mode_change(self):
self.on_selection_modified(self.current_view)
self.on_selection_modified(self.current_view)

0 comments on commit d908ad9

Please sign in to comment.