diff options
| author | nyamatongwe <devnull@localhost> | 2004-06-01 13:31:58 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2004-06-01 13:31:58 +0000 | 
| commit | 77a447e9645e3c03061c7c9a8ad61921ced8be3d (patch) | |
| tree | b163413284fbcee8ee0a21de6c79bd1c7f47f2f0 /src | |
| parent | b252c4dc9752c17f10ca225120cc338561e1b11a (diff) | |
| download | scintilla-mirror-77a447e9645e3c03061c7c9a8ad61921ced8be3d.tar.gz | |
Patch for allowing retrieval of document text encoded as
UTF-8 and converting from UTF-8 to the document
encoding.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 6 | ||||
| -rw-r--r-- | src/Editor.h | 1 | ||||
| -rw-r--r-- | src/PropSet.cxx | 2 | 
3 files changed, 8 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 1ab36610b..23b612229 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -360,6 +360,8 @@ Editor::Editor() {  	topLine = 0;  	posTopLine = 0; +	 +	lengthForEncode = 0;  	needUpdateUI = true;  	braces[0] = invalidPosition; @@ -6948,6 +6950,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		SetSelection(currentPos, anchor);	// Ensure selection inside document  		return 0; +	case SCI_SETLENGTHFORENCODE: +		lengthForEncode = wParam; +		return 0; +  	case SCI_SELECTIONISRECTANGLE:  		return selType == selRectangle ? 1 : 0; diff --git a/src/Editor.h b/src/Editor.h index b9bda04ab..d5116f0de 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -257,6 +257,7 @@ protected:	// ScintillaBase subclass needs access to much of Editor  	int searchFlags;  	int topLine;  	int posTopLine; +	int lengthForEncode;  	bool needUpdateUI;  	Position braces[2]; diff --git a/src/PropSet.cxx b/src/PropSet.cxx index 00e9986f7..bf345145f 100644 --- a/src/PropSet.cxx +++ b/src/PropSet.cxx @@ -124,7 +124,7 @@ SString &SString::assign(const char *sOther, lenpos_t sSize_) {  		s = StringAllocate(sOther, sSize_);  		if (s) {  			sSize = sSize_;	// Allow buffer bigger than real string, thus providing space to grow -			sLen = strlen(s); +			sLen = sSize_;  		} else {  			sSize = sLen = 0;  		}  | 
