diff options
Diffstat (limited to 'src/PositionCache.h')
| -rw-r--r-- | src/PositionCache.h | 12 | 
1 files changed, 11 insertions, 1 deletions
diff --git a/src/PositionCache.h b/src/PositionCache.h index edc0a5ddb..5a829b76b 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -16,6 +16,15 @@ static inline bool IsEOLChar(char ch) {  	return (ch == '\r') || (ch == '\n');  } +// There are two points for some positions and this enumeration +// can choose between the end of the first line or subline +// and the start of the next line or subline. +enum PointEnd { +	peDefault = 0x0, +	peLineEnd = 0x1, +	peSubLineEnd = 0x2 +}; +  /**   */  class LineLayout { @@ -28,6 +37,7 @@ private:  	bool inCache;  public:  	enum { wrapWidthInfinite = 0x7ffffff }; +  	int maxLineLength;  	int numCharsInLine;  	int numCharsBeforeEOL; @@ -64,7 +74,7 @@ public:  	void RestoreBracesHighlight(Range rangeLine, const Position braces[], bool ignoreStyle);  	int FindBefore(XYPOSITION x, int lower, int upper) const;  	int FindPositionFromX(XYPOSITION x, Range range, bool charPosition) const; -	Point PointFromPosition(int posInLine, int lineHeight) const; +	Point PointFromPosition(int posInLine, int lineHeight, PointEnd pe) const;  	int EndLineStyle() const;  };  | 
