diff options
author | nyamatongwe <unknown> | 2010-09-24 13:14:40 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2010-09-24 13:14:40 +1000 |
commit | 7fb06ca08a70dd9f9549b1e34c7dd38e9ca1413a (patch) | |
tree | f16cf3c34093167f55e567d7a02edeef19675d19 /src/ContractionState.cxx | |
parent | 228fcb30c6b21ef2756a07a3eaf34f6371e80a39 (diff) | |
download | scintilla-mirror-7fb06ca08a70dd9f9549b1e34c7dd38e9ca1413a.tar.gz |
Added SCI_CONTRACTEDFOLDNEXT as a way to find contracted fold headers efficiently.
Diffstat (limited to 'src/ContractionState.cxx')
-rw-r--r-- | src/ContractionState.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ContractionState.cxx b/src/ContractionState.cxx index f2cc2f07b..8a1b486e7 100644 --- a/src/ContractionState.cxx +++ b/src/ContractionState.cxx @@ -193,6 +193,23 @@ bool ContractionState::SetExpanded(int lineDoc, bool expanded_) { } } +int ContractionState::ContractedNext(int lineDocStart) const { + if (OneToOne()) { + return -1; + } else { + Check(); + if (!expanded->ValueAt(lineDocStart)) { + return lineDocStart; + } else { + int lineDocNextChange = expanded->EndRun(lineDocStart); + if (lineDocNextChange < LinesInDoc()) + return lineDocNextChange; + else + return -1; + } + } +} + int ContractionState::GetHeight(int lineDoc) const { if (OneToOne()) { return 1; |