diff options
| author | nyamatongwe <unknown> | 2000-08-21 12:28:18 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2000-08-21 12:28:18 +0000 | 
| commit | 6ed3892e53bbad8ac5af2bfacecb773337a501f3 (patch) | |
| tree | 5000e0ba3f796393861c9f619bceaa09084be285 /src/ScintillaBase.cxx | |
| parent | 74537dd24ba7943e79652b06f4b752be2035bcea (diff) | |
| download | scintilla-mirror-6ed3892e53bbad8ac5af2bfacecb773337a501f3.tar.gz | |
Merging patches from Ferda and Jan.
Autocompletion flags for ignoring case and automatically choosing single
items.
WM_PAINT handling with passed HDC.
Events in Scintilla.iface.
Diffstat (limited to 'src/ScintillaBase.cxx')
| -rw-r--r-- | src/ScintillaBase.cxx | 30 | 
1 files changed, 30 insertions, 0 deletions
| diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index bf81887f2..70e890e1a 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -171,6 +171,22 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {  	//Platform::DebugPrintf("AutoComplete %s\n", list);  	ct.CallTipCancel(); +	if (ac.chooseSingle) { +		if (list && !strchr(list, ac.GetSeparator())) { +			if (ac.ignoreCase) { +				SetEmptySelection(currentPos - lenEntered); +				pdoc->DeleteChars(currentPos, lenEntered); +				SetEmptySelection(currentPos); +				pdoc->InsertString(currentPos, list); +				SetEmptySelection(currentPos + strlen(list)); +			} else { +				SetEmptySelection(currentPos); +				pdoc->InsertString(currentPos, list + lenEntered); +				SetEmptySelection(currentPos + strlen(list + lenEntered)); +			} +			return; +		} +	}  	ac.Start(wDraw, idAutoComplete, currentPos, lenEntered);  	PRectangle rcClient = GetClientRectangle(); @@ -396,6 +412,20 @@ long ScintillaBase::WndProc(unsigned int iMessage, unsigned long wParam, long lP  		ac.SetFillUpChars(reinterpret_cast<char *>(lParam));  		break; +	case SCI_AUTOCSETCHOOSESINGLE: +		ac.chooseSingle = wParam; +		break; + +	case SCI_AUTOCGETCHOOSESINGLE: +		return ac.chooseSingle; +		 +	case SCI_AUTOCSETIGNORECASE: +		ac.ignoreCase = wParam; +		break; +		 +	case SCI_AUTOCGETIGNORECASE: +		return ac.ignoreCase; +		  	case SCI_CALLTIPSHOW: {  			AutoCompleteCancel();  			if (!ct.wCallTip.Created()) { | 
