From 2037cc5ef575f134de2790eda299e7becb2c5a01 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 25 Oct 2016 16:14:35 +0200 Subject: [PATCH] Fixup a700d657 : holes in right margin selection --- src/RowPainter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp index 0d92136bd2..8a92d3e785 100644 --- a/src/RowPainter.cpp +++ b/src/RowPainter.cpp @@ -617,11 +617,6 @@ void RowPainter::paintSelection() const if ((row_.begin_margin_sel && !rtl) || (row_.end_margin_sel && rtl)) pi_.pain.fillRectangle(int(xo_), y1, row_.left_margin, y2 - y1, Color_selection); - if ((row_.begin_margin_sel && rtl) || (row_.end_margin_sel && !rtl)) - pi_.pain.fillRectangle(int(xo_ + row_.width()), y1, - text_metrics_.width() - row_.width(), y2 - y1, - Color_selection); - // go through row and draw from RTL boundary to RTL boundary int x = xo_ + row_.left_margin; for (auto const & e : row_) { @@ -647,6 +642,11 @@ void RowPainter::paintSelection() const } x += e.full_width(); } + + if ((row_.begin_margin_sel && rtl) || (row_.end_margin_sel && !rtl)) + pi_.pain.fillRectangle(x, y1, int(xo_) + text_metrics_.width() - x, y2 - y1, + Color_selection); + }