From 46c3c53a3c290f8757931a9f30bbf5f9577dd685 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 7 Jul 2009 11:52:09 +0000 Subject: Using the last style on a line to determine the width of a virtual space rather than use the default style. This adapts better for comments which use a different font. --- src/PositionCache.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/PositionCache.cxx') diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 258a14860..b727ec465 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -197,6 +197,10 @@ int LineLayout::FindBefore(int x, int lower, int upper) const { return lower; } +int LineLayout::EndLineStyle() const { + return styles[numCharsBeforeEOL > 0 ? numCharsBeforeEOL-1 : 0]; +} + LineLayoutCache::LineLayoutCache() : level(0), length(0), size(0), cache(0), allInvalidated(false), styleClock(-1), useCount(0) { -- cgit v1.2.3