Ejemplo n.º 1
0
 def show(self, x, show_surrounds = True):
     """ Scrolls the view to reveal x, which may be a Region or point """
     if isinstance(x, Region):
         return sublime_api.view_show_region(self.view_id, x, show_surrounds)
     if isinstance(x, Selection):
         for i in x:
             return sublime_api.view_show_region(self.view_id, i, show_surrounds)
     else:
         return sublime_api.view_show_point(self.view_id, x, show_surrounds)
Ejemplo n.º 2
0
 def show(self, x, show_surrounds = True):
     """ Scrolls the view to reveal x, which may be a Region or point """
     if isinstance(x, Region):
         return sublime_api.view_show_region(self.view_id, x, show_surrounds)
     if isinstance(x, Selection):
         for i in x:
             return sublime_api.view_show_region(self.view_id, i, show_surrounds)
     else:
         return sublime_api.view_show_point(self.view_id, x, show_surrounds)