SHARE
TWEET

toggleScrollbar

a guest Oct 19th, 2010 57 Never
  1. import sublime, sublimeplugin
  2.  
  3. class toggleScrollbarPlugin(sublimeplugin.Plugin):
  4.   def onSelectionModified(self, view):
  5.     verticalScrollBar = view.options().get('wantVerticalScrollBar')
  6.     if view.size() == view.visibleRegion().size():
  7.       if verticalScrollBar:
  8.         view.options().set('wantVerticalScrollBar', False)
  9.     else:
  10.       if not verticalScrollBar:
  11.         view.options().set('wantVerticalScrollBar', True)
RAW Paste Data
Top