From da039355e50595c3c55930b7c53bd653980c8bfe Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 9 Dec 2011 15:04:05 +1100 Subject: Fractional position support. --- src/PositionCache.cxx | 4 ++-- src/PositionCache.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 614e6b8bf..759558e73 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -189,10 +189,10 @@ void LineLayout::RestoreBracesHighlight(Range rangeLine, Position braces[], bool xHighlightGuide = 0; } -int LineLayout::FindBefore(int x, int lower, int upper) const { +int LineLayout::FindBefore(XYPOSITION x, int lower, int upper) const { do { int middle = (upper + lower + 1) / 2; // Round high - int posMiddle = positions[middle]; + XYPOSITION posMiddle = positions[middle]; if (x < posMiddle) { upper = middle - 1; } else { diff --git a/src/PositionCache.h b/src/PositionCache.h index 280446627..bd27783c9 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -65,7 +65,7 @@ public: void SetBracesHighlight(Range rangeLine, Position braces[], char bracesMatchStyle, int xHighlight, bool ignoreStyle); void RestoreBracesHighlight(Range rangeLine, Position braces[], bool ignoreStyle); - int FindBefore(int x, int lower, int upper) const; + int FindBefore(XYPOSITION x, int lower, int upper) const; int EndLineStyle() const; }; -- cgit v1.2.3