diff options
author | XhmikosR <xhmikosr@gmail.com> | 2016-12-04 18:20:31 +0200 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2016-12-04 18:24:16 +0200 |
commit | 4b604e07bbbf07d3d5ad04e65f0cef56959e3807 (patch) | |
tree | 44a5924e0ef508167b285c8016e6394992153817 /scintilla/src/PositionCache.cxx | |
parent | a3ee58329361322b321ee2a708e793b1a5e5729a (diff) | |
download | notepad2-mod-master.zip notepad2-mod-master.tar.gz notepad2-mod-master.tar.bz2 |
Update Scintilla to v3.7.1.HEADorigin/masterorigin/HEADmaster
Diffstat (limited to 'scintilla/src/PositionCache.cxx')
-rw-r--r-- | scintilla/src/PositionCache.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scintilla/src/PositionCache.cxx b/scintilla/src/PositionCache.cxx index c9cf637..66b634a 100644 --- a/scintilla/src/PositionCache.cxx +++ b/scintilla/src/PositionCache.cxx @@ -217,7 +217,7 @@ int LineLayout::FindPositionFromX(XYPOSITION x, Range range, bool charPosition) return range.end;
}
-Point LineLayout::PointFromPosition(int posInLine, int lineHeight) const {
+Point LineLayout::PointFromPosition(int posInLine, int lineHeight, PointEnd pe) const {
Point pt;
// In case of very long line put x at arbitrary large position
if (posInLine > maxLineLength) {
@@ -232,6 +232,12 @@ Point LineLayout::PointFromPosition(int posInLine, int lineHeight) const { pt.x = positions[posInLine] - positions[rangeSubLine.start];
if (rangeSubLine.start != 0) // Wrapped lines may be indented
pt.x += wrapIndent;
+ if (pe & peSubLineEnd) // Return end of first subline not start of next
+ break;
+ } else if ((pe & peLineEnd) && (subLine == (lines-1))) {
+ pt.x = positions[numCharsInLine] - positions[rangeSubLine.start];
+ if (rangeSubLine.start != 0) // Wrapped lines may be indented
+ pt.x += wrapIndent;
}
} else {
break;
|