From ade021a7022a79c56a9c5bd6b4f68f1906860809 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 12 Apr 2012 14:05:13 +1000 Subject: Bug #3514882. Fix recent change set 4086 which caused selection to end of a wrapped subline to continue 1 pixel into the next subline. From Marko Njezic. --- src/Editor.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index a41a5e24a..8847075ac 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3250,7 +3250,8 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - subLineStart + portion.end.VirtualSpace() * spaceWidth; rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; - SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, r == sel.Main()), alpha); + if (rcSegment.right > rcLine.left) + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, r == sel.Main()), alpha); } } } -- cgit v1.2.3