summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkCanvText.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index 2d462ee..ef57473 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvText.c,v 1.9 2001/07/03 06:03:44 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvText.c,v 1.10 2001/08/17 21:08:28 drh Exp $
*/
#include <stdio.h>
@@ -771,7 +771,7 @@ DisplayCanvText(canvas, itemPtr, display, drawable, x, y, width, height)
}
if ((selFirstChar >= 0) && (selFirstChar <= selLastChar)) {
int xFirst, yFirst, hFirst;
- int xLast, yLast;
+ int xLast, yLast, wLast;
/*
* Draw a special background under the selection.
@@ -780,7 +780,7 @@ DisplayCanvText(canvas, itemPtr, display, drawable, x, y, width, height)
Tk_CharBbox(textPtr->textLayout, selFirstChar, &xFirst, &yFirst,
NULL, &hFirst);
Tk_CharBbox(textPtr->textLayout, selLastChar, &xLast, &yLast,
- NULL, NULL);
+ &wLast, NULL);
/*
* If the selection spans the end of this line, then display
@@ -793,7 +793,7 @@ DisplayCanvText(canvas, itemPtr, display, drawable, x, y, width, height)
height = hFirst;
for (y = yFirst ; y <= yLast; y += height) {
if (y == yLast) {
- width = xLast - x;
+ width = xLast + wLast - x;
} else {
width = textPtr->rightEdge - textPtr->leftEdge - x;
}