From 4120b34e5c7bd5837ded943344270b2d9e26cd90 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 8 Aug 2013 17:59:56 +1000 Subject: Move functionality from Editor to ViewStyle. controlCharSymbol setting moved along with calculated fields for tab width and control symbols. Use of TextSegment simplified and variables made const where possible. --- src/PositionCache.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/PositionCache.h') diff --git a/src/PositionCache.h b/src/PositionCache.h index a0b805743..6d14cf0a3 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -137,9 +137,12 @@ public: struct TextSegment { int start; int length; - Representation *repr; - TextSegment(int start_=0, int length_=0, Representation *repr_=0) : - start(start_), length(length_), repr(repr_) { + Representation *representation; + TextSegment(int start_=0, int length_=0, Representation *representation_=0) : + start(start_), length(length_), representation(representation_) { + } + int end() const { + return start + length; } }; -- cgit v1.2.3