diff options
Diffstat (limited to 'lexlib')
| -rw-r--r-- | lexlib/LexAccessor.h | 21 | ||||
| -rw-r--r-- | lexlib/StyleContext.h | 2 | 
2 files changed, 5 insertions, 18 deletions
| diff --git a/lexlib/LexAccessor.h b/lexlib/LexAccessor.h index 064a17581..0cf6e8ce0 100644 --- a/lexlib/LexAccessor.h +++ b/lexlib/LexAccessor.h @@ -79,11 +79,8 @@ public:  		}  		return buf[position - startPos];  	} -	IDocumentWithLineEnd *MultiByteAccess() const { -		if (documentVersion >= dvLineEnd) { -			return static_cast<IDocumentWithLineEnd *>(pAccess); -		} -		return 0; +	IDocument *MultiByteAccess() const { +		return pAccess;  	}  	/** Safe version of operator[], returning a defined value for invalid position. */  	char SafeGetCharAt(Sci_Position position, char chDefault=' ') { @@ -120,17 +117,7 @@ public:  		return pAccess->LineStart(line);  	}  	Sci_Position LineEnd(Sci_Position line) { -		if (documentVersion >= dvLineEnd) { -			return (static_cast<IDocumentWithLineEnd *>(pAccess))->LineEnd(line); -		} else { -			// Old interface means only '\r', '\n' and '\r\n' line ends. -			Sci_Position startNext = pAccess->LineStart(line+1); -			const char chLineEnd = SafeGetCharAt(startNext-1); -			if (chLineEnd == '\n' && (SafeGetCharAt(startNext-2)  == '\r')) -				return startNext - 2; -			else -				return startNext - 1; -		} +		return pAccess->LineEnd(line);  	}  	int LevelAt(Sci_Position line) const {  		return pAccess->GetLevel(line); @@ -153,7 +140,7 @@ public:  	}  	// Style setting  	void StartAt(Sci_PositionU start) { -		pAccess->StartStyling(start, '\377'); +		pAccess->StartStyling(start);  		startPosStyling = start;  	}  	Sci_PositionU GetStartSegment() const { diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h index a536822e2..abfc07318 100644 --- a/lexlib/StyleContext.h +++ b/lexlib/StyleContext.h @@ -18,7 +18,7 @@ namespace Scintilla {  // syntactically significant. UTF-8 avoids this as all trail bytes are >= 0x80  class StyleContext {  	LexAccessor &styler; -	IDocumentWithLineEnd *multiByteAccess; +	IDocument *multiByteAccess;  	Sci_PositionU endPos;  	Sci_PositionU lengthDocument; | 
