aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/RunStyles.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-06-07 11:30:23 +1000
committernyamatongwe <unknown>2011-06-07 11:30:23 +1000
commitcfd7180e33b49c884738f4975584f0d010a28b99 (patch)
tree50f88b12e28928c8d9f2daeb5a30ae5183e92dd7 /src/RunStyles.cxx
parentbd88866db20ffb28513e713957ba8c27e47a8a08 (diff)
downloadscintilla-mirror-cfd7180e33b49c884738f4975584f0d010a28b99.tar.gz
Make SCN_NEEDSHOWN notification work when word wrap is enabled.
This fixes the last remaining issue from bug #3291579. From Marko Njezic
Diffstat (limited to 'src/RunStyles.cxx')
-rw-r--r--src/RunStyles.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx
index 460d5d244..0f2196972 100644
--- a/src/RunStyles.cxx
+++ b/src/RunStyles.cxx
@@ -216,3 +216,14 @@ void RunStyles::DeleteRange(int position, int deleteLength) {
}
}
+bool RunStyles::AllSame() const {
+ for (int run = 1; run < starts->Partitions(); run++) {
+ if (styles->ValueAt(run) != styles->ValueAt(run - 1))
+ return false;
+ }
+ return true;
+}
+
+bool RunStyles::AllSameAs(int value) const {
+ return AllSame() && (styles->ValueAt(0) == value);
+}