From 92401ee4b174408b143553be6acfb1181650a257 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 2 Dec 2016 15:31:03 +0530 Subject: [PATCH] Fix multi-line selection not working if end line column is smaller than start line column --- kitty/char_grid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/char_grid.py b/kitty/char_grid.py index a2d63293a..9a39f17a6 100644 --- a/kitty/char_grid.py +++ b/kitty/char_grid.py @@ -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: