diff options
| -rw-r--r-- | include/WindowAccessor.h | 2 | ||||
| -rw-r--r-- | src/CellBuffer.cxx | 4 | ||||
| -rw-r--r-- | src/DocumentAccessor.h | 2 | ||||
| -rw-r--r-- | src/Editor.cxx | 4 | ||||
| -rw-r--r-- | src/SVector.h | 6 | ||||
| -rw-r--r-- | src/ScintillaBase.cxx | 7 | ||||
| -rw-r--r-- | win32/ScintillaWin.cxx | 1 | 
7 files changed, 20 insertions, 6 deletions
| diff --git a/include/WindowAccessor.h b/include/WindowAccessor.h index 89a542e82..4f41dfc7f 100644 --- a/include/WindowAccessor.h +++ b/include/WindowAccessor.h @@ -22,7 +22,7 @@ protected:  public:  	WindowAccessor(WindowID id_, PropSet &props_) :   		Accessor(), id(id_), props(props_),  -		lenDoc(-1), validLen(0), chFlags(0) { +		lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {  	}  	~WindowAccessor();  	char StyleAt(int position); diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 3f094ce96..130b289e6 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -119,7 +119,11 @@ void MarkerHandleSet::CombineWith(MarkerHandleSet *other) {  LineVector::LineVector() {  	linesData = 0;  	lines = 0; +    size = 0;  	levels = 0; +    sizeLevels = 0; +	handleCurrent = 1; +  	Init();  } diff --git a/src/DocumentAccessor.h b/src/DocumentAccessor.h index 37a9db414..ccc05fee9 100644 --- a/src/DocumentAccessor.h +++ b/src/DocumentAccessor.h @@ -24,7 +24,7 @@ protected:  public:  	DocumentAccessor(Document *pdoc_, PropSet &props_) :   		Accessor(), pdoc(pdoc_), props(props_),  -		lenDoc(-1), validLen(0), chFlags(0) { +		lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {  	}  	~DocumentAccessor();  	char StyleAt(int position); diff --git a/src/Editor.cxx b/src/Editor.cxx index f1c497db2..3cf2c179e 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -735,7 +735,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou  	int styleMask = pdoc->stylingBitsMask;  	ll.xHighlightGuide = 0;  	for (int charInDoc = posLineStart;  -		charInDoc < posLineEnd && numCharsInLine < LineLayout::maxLineLength - 1;  +		charInDoc < posLineEnd && numCharsInLine < LineLayout::maxLineLength - 2;   		charInDoc++) {  		char chDoc = pdoc->CharAt(charInDoc);  		styleByte = pdoc->StyleAt(charInDoc); @@ -749,11 +749,13 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou  	ll.chars[numCharsInLine] = 0;  	ll.styles[numCharsInLine] = styleByte;	// For eolFilled  	ll.indicators[numCharsInLine] = 0; +	ll.indicators[numCharsInLine+1] = 0;  	// Layout the line, determining the position of each character  	int startseg = 0;  	int startsegx = 0;  	ll.positions[0] = 0; +	ll.positions[numCharsInLine + 1] = 0;  	unsigned int tabWidth = vstyle.spaceWidth * pdoc->tabInChars;  	for (int charInLine = 0; charInLine < numCharsInLine; charInLine++) { diff --git a/src/SVector.h b/src/SVector.h index 550dd87eb..9a260542b 100644 --- a/src/SVector.h +++ b/src/SVector.h @@ -30,9 +30,13 @@ class SVector {  			return;  		}  		size = newSize; -		for (unsigned int i=0; i<len; i++) { +        unsigned int i=0; +		for (; i<len; i++) {  			newv[i] = v[i];  		} +		for (; i<size; i++) { +			newv[i] = 0; +		}  		delete []v;  		v = newv;  	} diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 0f7d944fe..ff2e001ec 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -41,7 +41,12 @@ ScintillaBase::ScintillaBase() {  #endif  } -ScintillaBase::~ScintillaBase() {} +ScintillaBase::~ScintillaBase() { +#ifdef SCI_LEXER	 +	for (int wl=0;wl<numWordLists;wl++) +		delete keyWordLists[wl]; +#endif +}  void ScintillaBase::Finalise() {  	popup.Destroy(); diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 0a7c18e2f..7cdbc64e6 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -183,7 +183,6 @@ public:  HINSTANCE ScintillaWin::hInstance = 0;  ScintillaWin::ScintillaWin(HWND hwnd) { -::SetThreadLocale(MAKELCID(932, SORT_DEFAULT));  	capturedMouse = false; | 
