Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sublime, sublimeplugin
- class toggleScrollbarPlugin(sublimeplugin.Plugin):
- def toggleScrollbar(self, view):
- verticalScrollBar = view.options().get('wantVerticalScrollBar')
- if view.size() == view.visibleRegion().size():
- if verticalScrollBar:
- view.options().set('wantVerticalScrollBar', False)
- else:
- if not verticalScrollBar:
- view.options().set('wantVerticalScrollBar', True)
- def onSelectionModified(self, view):
- self.toggleScrollbar(view)
- def onActivated(self, view):
- self.toggleScrollbar(view)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement