Permalink
Browse files

Merge pull request #4 from MSch/master

Fix edge cases
  • Loading branch information...
2 parents c3e0fc4 + 2baf17b commit 76281ebc4fc48b1fad4ec7fb6b1f04bd3ed6a254 @netpro2k committed May 9, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 SublimeBlockCursor.py
View
@@ -26,6 +26,13 @@ def on_selection_modified(self, view):
def on_deactivated(self, view):
view.erase_regions('SublimeBlockCursorListener')
+ view.settings().clear_on_change('command_mode')
+ self.current_view = None
def on_activated(self, view):
- self.show_block_cursor(view)
+ self.on_selection_modified(view)
+ view.settings().add_on_change('command_mode', self.on_command_mode_change)
+ self.current_view = view
+
+ def on_command_mode_change(self):
+ self.on_selection_modified(self.current_view)

0 comments on commit 76281eb

Please sign in to comment.