vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 3ff6935f6c7c2fde4eb4c61bcfe89a6a19e93508 parent c7f67605ed319ef52e47d665fcc0b8ceeb8a5f5f Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 14 Jun 2017 14:00:16 +0200 text-util: change definition of range intersection Adjacent ranges do not overlap. Diffstat:
| M | text-util.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/text-util.c b/text-util.c @@ -43,7 +43,7 @@ bool text_range_equal(const Filerange *r1, const Filerange *r2) { bool text_range_overlap(const Filerange *r1, const Filerange *r2) { if (!text_range_valid(r1) || !text_range_valid(r2)) return false; - return r1->start <= r2->end && r2->start <= r1->end; + return r1->start < r2->end && r2->start < r1->end; } bool text_range_contains(const Filerange *r, size_t pos) {