From a0ebebe503affd3447a29c1253579f392cc45132 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 22 Jun 2014 13:44:46 +1000 Subject: Stop storing a pointer to the selection on LineLayout objects where it may have a lifetime that is too long. Instead provide it as an argument to BreakFinder where it is only needed during intialisation. --- src/PositionCache.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/PositionCache.h') diff --git a/src/PositionCache.h b/src/PositionCache.h index e26b4b273..64ccfda34 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -34,7 +34,6 @@ public: enum validLevel { llInvalid, llCheckTextAndStyle, llPositions, llLines } validity; int xHighlightGuide; bool highlightColumn; - Selection *psel; bool containsCaret; int edgeColumn; char *chars; @@ -170,7 +169,7 @@ public: enum { lengthStartSubdivision = 300 }; // Try to make each subdivided run lengthEachSubdivision or shorter. enum { lengthEachSubdivision = 100 }; - BreakFinder(const LineLayout *ll_, int lineStart_, int lineEnd_, int posLineStart_, + BreakFinder(const LineLayout *ll_, const Selection *psel, int lineStart_, int lineEnd_, int posLineStart_, int xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_); ~BreakFinder(); TextSegment Next(); -- cgit v1.2.3