diff options
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | src/Editor.cxx | 5 | 
2 files changed, 8 insertions, 1 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 87f79f755..35592a94c 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -530,6 +530,10 @@  	Optimise marker redrawing by only drawing affected lines when markers shown in the text.  	</li>  	<li> +	Report error (SC_STATUS_FAILURE) when negative length passed to SCI_SETSTYLING. +	<a href="http://sourceforge.net/p/scintilla/bugs/1768/">Bug #1768</a>. +	</li> +	<li>  	When SC_MARK_UNDERLINE if not assigned to a margin, stop drawing the whole line.  	</li>  	<li> diff --git a/src/Editor.cxx b/src/Editor.cxx index 8a3a367db..6141b0628 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6267,7 +6267,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		break;  	case SCI_SETSTYLING: -		pdoc->SetStyleFor(static_cast<int>(wParam), static_cast<char>(lParam)); +		if (static_cast<int>(wParam) < 0) +			errorStatus = SC_STATUS_FAILURE; +		else +			pdoc->SetStyleFor(static_cast<int>(wParam), static_cast<char>(lParam));  		break;  	case SCI_SETSTYLINGEX:             // Specify a complete styling buffer | 
