code: def set_scroll_offset(editor, value):
      
      if value is None:
          editor.show_message('scrolloff=%i' % editor.scroll_offset)
      else:
          try:
              value = int(value)
              if value >= 0:
                  editor.scroll_offset = value
              else:
                  editor.show_message('Argument must be positive')
          except ValueError:
              editor.show_message('Number required after =')
docs: Set scroll offset.