Fix multi-line selection not working if end line column is smaller than start line column

This commit is contained in:
Kovid Goyal 2016-12-02 15:31:03 +05:30
parent 7afbfb8349
commit 92401ee4b1

View File

@ -164,7 +164,7 @@ class Selection:
def limits(self, scrolled_by):
a = (self.start_x, self.start_y - self.start_scrolled_by + scrolled_by)
b = (self.end_x, self.end_y - self.end_scrolled_by + scrolled_by)
return (a, b) if a <= b else (b, a)
return (a, b) if a[1] < b[1] or (a[1] == b[1] and a[0] <= b[0]) else (b, a)
class CharGrid: