diff options
author | Marko Njezic <devnull@localhost> | 2012-04-13 00:16:36 +0200 |
---|---|---|
committer | Marko Njezic <devnull@localhost> | 2012-04-13 00:16:36 +0200 |
commit | d8863139998da18b5649da18223d8888fc4fdf6d (patch) | |
tree | 2a44febeaa3e046e8b6c4b18ca144df458fb4da7 | |
parent | 2df0c128e1ea926101b371208a6a86a875465926 (diff) | |
download | scintilla-mirror-d8863139998da18b5649da18223d8888fc4fdf6d.tar.gz |
Include wrap indentation in alpha selection when selecting whole lines. Bug #3515555.
-rw-r--r-- | src/Editor.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 2376af413..4249fb648 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3248,6 +3248,10 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; rcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] - subLineStart + portion.start.VirtualSpace() * spaceWidth; rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - subLineStart + portion.end.VirtualSpace() * spaceWidth; + if ((ll->wrapIndent != 0) && (lineStart != 0)) { + if ((portion.start.Position() - posLineStart) == lineStart && sel.Range(r).ContainsCharacter(portion.start.Position() - 1)) + rcSegment.left -= static_cast<int>(ll->wrapIndent); // indentation added to xStart was truncated to int, so we do the same here + } rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; if (rcSegment.right > rcLine.left) |