vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 6a977de9250888ef99d8946f7d021e225c069b18
parent 70eabc952cd61a4faa7b3334dbd18fbb0d16df3c
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Sun,  9 Jul 2017 12:25:59 +0200

vis: simplify and fix pairwise selection intersection

Diffstat:
Mmain.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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) {