From 19a5d3c16ff5ef6861b5d2f0c5e0e4ce06ee73d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 9 Jul 2017 12:25:59 +0200 Subject: vis: simplify and fix pairwise selection intersection --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index c820a79..8be58cd 100644 --- a/main.c +++ b/main.c @@ -1829,7 +1829,7 @@ static Filerange combine_union(const Filerange *r1, const Filerange *r2) { static Filerange combine_intersect(const Filerange *r1, const Filerange *r2) { if (!r1 || !r2) return text_range_empty(); - return text_range_new(MAX(r1->start, r2->start), MIN(r1->end, r2->end)); + return text_range_intersect(r1, r2); } static Filerange combine_longer(const Filerange *r1, const Filerange *r2) { -- cgit v1.2.3