From 65e526dd2a5b1fce59513a7f2720ffbf91c2f310 Mon Sep 17 00:00:00 2001 From: Marko Njezic Date: Fri, 13 Apr 2012 00:16:36 +0200 Subject: Include wrap indentation in alpha selection when selecting whole lines. Bug #3515555. --- src/Editor.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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(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) -- cgit v1.2.3