diff options
author | nyamatongwe <devnull@localhost> | 2011-06-07 11:37:15 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-06-07 11:37:15 +1000 |
commit | 1b3f7d04c670a821ee7ed2c60dea9e898742bf7c (patch) | |
tree | 5771504fece039a879bc0f34a413f72aa89849bc /src/RunStyles.cxx | |
parent | 50042e8d340a9a8f00028b850d18b721f19000c3 (diff) | |
download | scintilla-mirror-1b3f7d04c670a821ee7ed2c60dea9e898742bf7c.tar.gz |
Add accessor to RunStyles for number of runs so Decoration can use public API.
Make RunStyles internal methods private.
RunFromPosition is const so marker as const.
Diffstat (limited to 'src/RunStyles.cxx')
-rw-r--r-- | src/RunStyles.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx index 0f2196972..c3414b4e8 100644 --- a/src/RunStyles.cxx +++ b/src/RunStyles.cxx @@ -21,7 +21,7 @@ using namespace Scintilla; #endif // Find the first run at a position -int RunStyles::RunFromPosition(int position) { +int RunStyles::RunFromPosition(int position) const { int run = starts->PartitionFromPosition(position); // Go to first element with this position while ((run > 0) && (position == starts->PositionFromPartition(run-1))) { @@ -216,6 +216,10 @@ void RunStyles::DeleteRange(int position, int deleteLength) { } } +int RunStyles::Runs() const { + return starts->Partitions(); +} + bool RunStyles::AllSame() const { for (int run = 1; run < starts->Partitions(); run++) { if (styles->ValueAt(run) != styles->ValueAt(run - 1)) |