aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-12-09 15:04:05 +1100
committernyamatongwe <devnull@localhost>2011-12-09 15:04:05 +1100
commitda039355e50595c3c55930b7c53bd653980c8bfe (patch)
treec6518cea9792d56ba645518957d30bdec021d672
parent5ee69ffbe6c90487a34964103ea13082c8fda734 (diff)
downloadscintilla-mirror-da039355e50595c3c55930b7c53bd653980c8bfe.tar.gz
Fractional position support.
-rw-r--r--src/PositionCache.cxx4
-rw-r--r--src/PositionCache.h2
2 files changed, 3 insertions, 3 deletions
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;
};