Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions SublimeBlockCursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@


class SublimeBlockCursor(sublime_plugin.EventListener):
def view_is_widget(view):
settings = view.settings()
return bool(settings.get('is_widget'))

def show_block_cursor(self, view):
validRegions = []
for s in view.sel():
Expand All @@ -19,10 +15,14 @@ def show_block_cursor(self, view):
view.erase_regions('SublimeBlockCursorListener')

def on_selection_modified(self, view):
if view is None:
return

is_vintage_mode = "Vintage" not in view.settings().get('ignored_packages', [])
command_mode = view.settings().get('command_mode')
view_is_widget = bool(view.settings().get('is_widget'))

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

Expand Down