diff options
| author | nyamatongwe <unknown> | 2003-04-07 08:14:32 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2003-04-07 08:14:32 +0000 | 
| commit | d91d55b62c8a6a56c9e08b58db81639c756b92b6 (patch) | |
| tree | 02f73b07fa4582623d5f03711ffb543acd677f2f /src | |
| parent | 5770440e3b61dbb9b9b8d704435b4d9540bfafd6 (diff) | |
| download | scintilla-mirror-d91d55b62c8a6a56c9e08b58db81639c756b92b6.tar.gz | |
Fix bug on GTK+ 2.x where synchronous repaint causes currentPos to be used
before it is reset.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 36390b427..85cac79ea 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1410,7 +1410,7 @@ void Editor::LinesSplit(int pixelWidth) {  				unsigned int posLineStart = pdoc->LineStart(line);  				LayoutLine(line, surface, vs, ll, pixelWidth);  				for (int subLine = 1; subLine < ll->lines; subLine++) { -					pdoc->InsertString(posLineStart + (subLine - 1) * strlen(eol) +  +					pdoc->InsertString(posLineStart + (subLine - 1) * strlen(eol) +  						ll->LineStart(subLine), eol);  					targetEnd += strlen(eol);  				} @@ -4857,6 +4857,13 @@ void Editor::SetDocPointer(Document *document) {  		pdoc = document;  	}  	pdoc->AddRef(); + +	// Ensure all positions within document +	currentPos = 0; +	anchor = 0; +	targetStart = 0; +	targetEnd = 0; +  	// Reset the contraction state to fully shown.  	cs.Clear();  	cs.InsertLines(0, pdoc->LinesTotal() - 1);  | 
