aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/RunStyles.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2007-06-09 01:07:26 +0000
committernyamatongwe <devnull@localhost>2007-06-09 01:07:26 +0000
commit88f77c347bb2788ec41ca2e30cbf68293fcb5b79 (patch)
treeb9e32fd0443391c2f9cb564e80de5744031c7363 /src/RunStyles.cxx
parent314d4475fc9290806c178007e4c6ef12649f0358 (diff)
downloadscintilla-mirror-88f77c347bb2788ec41ca2e30cbf68293fcb5b79.tar.gz
Fixed bug when setting a range where the start of the range was already a
run start.
Diffstat (limited to 'src/RunStyles.cxx')
-rw-r--r--src/RunStyles.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx
index 286734e9b..76174fea4 100644
--- a/src/RunStyles.cxx
+++ b/src/RunStyles.cxx
@@ -130,11 +130,13 @@ bool RunStyles::FillRange(int &position, int value, int &fillLength) {
if (styles->ValueAt(runStart) == value) {
// Start is in expected value so trim range.
runStart++;
- position = starts->PositionFromPartition(runStart);
+ position = starts->PositionFromPartition(runStart);
fillLength = end - position;
} else {
- runStart = SplitRun(position);
- runEnd++;
+ if (starts->PositionFromPartition(runStart) < position) {
+ runStart = SplitRun(position);
+ runEnd++;
+ }
}
styles->SetValueAt(runStart, value);
// Remove each old run over the range