コード例 #1
0
ファイル: sublime.py プロジェクト: ronnyzxr/aml
 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)
コード例 #2
0
ファイル: sublime.py プロジェクト: JennerChen/mySublimeWork
 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)