layout: Fix bol_as_eol for case where range length is 0

bol_as_eol was meant for non-empty ranges, but the only place where
empty ranges were attempted with bol_as_eol was for Zoom tracking,
and it seems like I did not re-test Zoom after making the bol_as_eol
commit.

Fixes textmate/bugs#4
This commit is contained in:
Boris Dušek
2014-07-12 12:40:47 +02:00
committed by Allan Odgaard
parent 754f1a1a4f
commit e08a40a507

View File

@@ -307,7 +307,7 @@ namespace ng
ASSERT_LE(first, last);
auto r1 = rect_at_index(first);
auto r2 = rect_at_index(last, bol_as_eol);
auto r2 = rect_at_index(last, bol_as_eol && (first != last));
auto res = CGRectZero;
if(CGRectGetMinY(r1) == CGRectGetMinY(r2) && CGRectGetHeight(r1) == CGRectGetHeight(r2))