diff options
| author | nyamatongwe <unknown> | 2013-03-18 15:23:08 +1100 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2013-03-18 15:23:08 +1100 | 
| commit | 3188cfac86cf4f47137b370cfb570adeca64648d (patch) | |
| tree | 57c32dfb2426594dd910e2f573e012398f947e42 /src | |
| parent | 1de1a2caec6943db0b44015b274e01f3f1fabea3 (diff) | |
| download | scintilla-mirror-3188cfac86cf4f47137b370cfb570adeca64648d.tar.gz | |
Bug: [#1455]. Fix unfolding when new line inserted.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index f63ceda43..98d98d38f 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7005,12 +7005,17 @@ void Editor::EnsureLineVisible(int lineDoc, bool enforcePolicy) {  		WrapLines(true, -1);  	if (!cs.GetVisible(lineDoc)) { +		// Back up to find a non-blank line   		int lookLine = lineDoc;  		int lookLineLevel = pdoc->GetLevel(lookLine);  		while ((lookLine > 0) && (lookLineLevel & SC_FOLDLEVELWHITEFLAG)) {  			lookLineLevel = pdoc->GetLevel(--lookLine);  		}  		int lineParent = pdoc->GetFoldParent(lookLine); +		if (lineParent < 0) { +			// Backed up to a top level line, so try to find parent of initial line  +			lineParent = pdoc->GetFoldParent(lineDoc); +		}  		if (lineParent >= 0) {  			if (lineDoc != lineParent)  				EnsureLineVisible(lineParent, enforcePolicy); | 
