ref: a50d6147f272215e7b4ead57975da2fdfb18da0a
parent: 7f5bd9984baea651694f8bd32fa49a00d31297c2
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Feb 17 05:46:37 EST 2020
plan9: fix selection extension when pasting
--- a/plan9.c
+++ b/plan9.c
@@ -616,9 +616,12 @@
}
free(s);
}
- // FIXME - expand properly if .min if the cur is on the right/bottom
sel.max.x = sel.min.x + MAX(0, cols-1);
sel.max.y = sel.min.y + MAX(0, rows-1);
+ if (sel.max.x < cur.x)
+ cur.x = sel.max.x;
+ if (sel.max.y < cur.y)
+ cur.y = sel.max.y;
Bterm(b);
}
}