diff options
| author | nyamatongwe <devnull@localhost> | 2010-09-24 13:14:40 +1000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2010-09-24 13:14:40 +1000 | 
| commit | 27fe93c781719be46a2ca770f33f9cfba9cb054c (patch) | |
| tree | cd28473d19ca2523fc24b6c430e65cbe037f7588 /src/ContractionState.cxx | |
| parent | e612ffd2248bcacfc56bee45f277d110393c7171 (diff) | |
| download | scintilla-mirror-27fe93c781719be46a2ca770f33f9cfba9cb054c.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; | 
