diff options
| author | nyamatongwe <unknown> | 2004-07-22 01:01:30 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2004-07-22 01:01:30 +0000 | 
| commit | 0aa0b154af8da590d14bd44a6d9c68bdec912d7d (patch) | |
| tree | 548a800dcf44ea2200f4b13a86b3f6cc80b8e643 /src | |
| parent | 37da1edc1e46647c03ce533e172b4e694aab2ecf (diff) | |
| download | scintilla-mirror-0aa0b154af8da590d14bd44a6d9c68bdec912d7d.tar.gz | |
Changed to allow multiline strings. This means SCE_LISP_STRINGEOL will no
longer be used.
Diffstat (limited to 'src')
| -rw-r--r-- | src/LexLisp.cxx | 22 | 
1 files changed, 2 insertions, 20 deletions
| diff --git a/src/LexLisp.cxx b/src/LexLisp.cxx index 9cd5433c8..549b573e2 100644 --- a/src/LexLisp.cxx +++ b/src/LexLisp.cxx @@ -66,9 +66,6 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W  	styler.StartAt(startPos);  	int state = initStyle; -	if (state == SCE_LISP_STRINGEOL)	// Does not leak onto next line -		state = SCE_LISP_DEFAULT; -	char chPrev = ' ';  	char chNext = styler[startPos];  	unsigned int lengthDoc = startPos + length;  	styler.StartSegment(startPos); @@ -77,19 +74,9 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W  		chNext = styler.SafeGetCharAt(i + 1);  		bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); -		if (atEOL) { -			// Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) -			// Avoid triggering two times on Dos/Win -			// End of line -			if (state == SCE_LISP_STRINGEOL) { -				styler.ColourTo(i, state); -				state = SCE_LISP_DEFAULT; -			} -		}  		if (styler.IsLeadByte(ch)) {  			chNext = styler.SafeGetCharAt(i + 2); -			chPrev = ' ';  			i += 1;  			continue;  		} @@ -107,9 +94,9 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W  				styler.ColourTo(i - 1, state);  				styler.ColourTo(i, SCE_LISP_OPERATOR);  			} -  			else if (ch == '\"') { -					state = SCE_LISP_STRING; +				styler.ColourTo(i - 1, state); +				state = SCE_LISP_STRING;  			}  		} else if (state == SCE_LISP_IDENTIFIER) {  			if (!isLispwordstart(ch)) { @@ -131,20 +118,15 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W  				if (ch == '\\') {  					if (chNext == '\"' || chNext == '\'' || chNext == '\\') {  						i++; -						ch = chNext;  						chNext = styler.SafeGetCharAt(i + 1);  					}  				} else if (ch == '\"') {  					styler.ColourTo(i, state);  					state = SCE_LISP_DEFAULT; -				} else if ((chNext == '\r' || chNext == '\n') && (chPrev != '\\')) { -					styler.ColourTo(i - 1, SCE_LISP_STRINGEOL); -					state = SCE_LISP_STRINGEOL;  				}  			}  		} -		chPrev = ch;  	}  	styler.ColourTo(lengthDoc - 1, state);  } | 
