diff options
author | Neil <nyamatongwe@gmail.com> | 2019-04-25 09:47:54 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-04-25 09:47:54 +1000 |
commit | 4bdc8cf08ec39e768b3dfab6856c6e29e1d3bb61 (patch) | |
tree | a81816c4f9d8dcc5c117d2543c34ee643f2098ca | |
parent | 60cc0d323ba2d1d17cdb6c61416bd0319855d6a4 (diff) | |
download | scintilla-mirror-4bdc8cf08ec39e768b3dfab6856c6e29e1d3bb61.tar.gz |
Backport: Bug [#1223]. Removed duplicate code.
Backport of changeset 7470:e9627636de12.
-rw-r--r-- | src/PositionCache.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index b1b55bd50..8910a2955 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -686,13 +686,13 @@ void PositionCache::MeasureWidths(Surface *surface, const ViewStyle &vstyle, uns probe = probe2; } } + FontAlias fontStyle = vstyle.styles[styleNumber].font; if (len > BreakFinder::lengthStartSubdivision) { // Break up into segments unsigned int startSegment = 0; XYPOSITION xStartSegment = 0; while (startSegment < len) { const unsigned int lenSegment = pdoc->SafeSegment(s + startSegment, len - startSegment, BreakFinder::lengthEachSubdivision); - FontAlias fontStyle = vstyle.styles[styleNumber].font; surface->MeasureWidths(fontStyle, s + startSegment, lenSegment, positions + startSegment); for (unsigned int inSeg = 0; inSeg < lenSegment; inSeg++) { positions[startSegment + inSeg] += xStartSegment; @@ -701,7 +701,6 @@ void PositionCache::MeasureWidths(Surface *surface, const ViewStyle &vstyle, uns startSegment += lenSegment; } } else { - FontAlias fontStyle = vstyle.styles[styleNumber].font; surface->MeasureWidths(fontStyle, s, len, positions); } if (probe < pces.size()) { |