예제 #1
0
 def substr(self, x):
     if isinstance(x, Region):
         return sublime_api.view_cached_substr(self.view_id, x.a, x.b)
     else:
         s = sublime_api.view_cached_substr(self.view_id, x, x + 1)
         # S2 backwards compat
         if len(s) == 0:
             return "\x00"
         else:
             return s
예제 #2
0
 def substr(self, x):
     if isinstance(x, Region):
         return sublime_api.view_cached_substr(self.view_id, x.a, x.b)
     else:
         s = sublime_api.view_cached_substr(self.view_id, x, x + 1)
         # S2 backwards compat
         if len(s) == 0:
             return "\x00"
         else:
             return s
예제 #3
0
파일: sublime.py 프로젝트: ronnyzxr/aml
 def substr(self, x):
     if isinstance(x, Region):
         return sublime_api.view_cached_substr(self.view_id, x.a, x.b)
     else:
         return sublime_api.view_cached_substr(self.view_id, x, x + 1)