aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index 423c12b..ccd3752 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -967,6 +967,14 @@ static int runes_screen_loc_is_between(
{
UNUSED(t);
+ if (end.row < start.row || (end.row == start.row && end.col < start.col)) {
+ struct runes_loc tmp;
+
+ tmp = start;
+ start = end;
+ end = tmp;
+ }
+
if (loc.row < start.row || loc.row > end.row) {
return 0;
}