コード例 #1
0
 def f(view, s):
     if (s.a > s.b and utils.is_at_eol(self.view, s) and not s.b == 0):
             return utils.forward_end_one_char(s)
     elif (s.a < s.b and utils.is_at_hard_eol(self.view, s)):
             return sublime.Region(s.a, s.b + 1)
     else:
         return s
コード例 #2
0
 def f(view, s):
     if (s.a > s.b and utils.is_at_eol(self.view, s) and not s.b == 0):
         return utils.forward_end_one_char(s)
     elif (s.a < s.b and utils.is_at_hard_eol(self.view, s)):
         return sublime.Region(s.a, s.b + 1)
     else:
         return s
コード例 #3
0
 def f(view, s):
     if s.a < s.b:
         # going forward
         if utils.is_at_hard_eol(self.view, s) and not utils.visual_is_on_empty_line_forward(self.view, s):
             return utils.back_end_one_char(s)
         else:
             return s
     else:
         # Moving down by lines.
         return s
コード例 #4
0
 def f(view, s):
     if s.a < s.b:
         # going forward
         if utils.is_at_hard_eol(self.view, s) and \
            not utils.visual_is_on_empty_line_forward(self.view, s):
             return utils.back_end_one_char(s)
         else:
             return s
     else:
         # Moving down by lines.
         return s