From 40c388e01d53bca38bfd4201209c53d3c40dbfa6 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 13 Feb 2017 01:28:46 -0500 Subject: [PATCH] Whoops, just realized I typo'd. --- common/drawtext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/drawtext.c b/common/drawtext.c index 9cc04966..3e657a7d 100644 --- a/common/drawtext.c +++ b/common/drawtext.c @@ -71,10 +71,10 @@ void drawTextBackground(uiDrawContext *c, double x, double y, uiDrawTextLayout * if (lend > end) // don't cross lines lend = end; startx = uiDrawTextLayoutByteLocationInLine(layout, line, start); - // TODO explain this + // TODO explain this; note the use of start with lend endx = layoutwid; if (!isSelection || end <= lend) - endx = uiDrawTextLayoutByteLocationInLine(layout, line, end); + endx = uiDrawTextLayoutByteLocationInLine(layout, line, lend); uiDrawTextLayoutLineGetMetrics(layout, line, &m); path = uiDrawNewPath(uiDrawFillModeWinding); uiDrawPathAddRectangle(path, @@ -84,6 +84,6 @@ void drawTextBackground(uiDrawContext *c, double x, double y, uiDrawTextLayout * uiDrawFill(c, path, brush); uiDrawFreePath(path); line++; - start += lend - start; + start = lend; } }