summaryrefslogtreecommitdiffstats
path: root/generic/tkTextMark.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextMark.c')
-rw-r--r--generic/tkTextMark.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c
index fe25f3c..cdb0612 100644
--- a/generic/tkTextMark.c
+++ b/generic/tkTextMark.c
@@ -625,15 +625,17 @@ TkTextInsertDisplayProc(
TkTextIndex index;
int halfWidth, insertWidth, insertBorderWidth;
int rightSideWidth;
- int ix = 0, iy = 0, iw = 0, ih = 0, charWidth = 0;
+ int ix = 0, iy = 0, iw = 0, ih = 0, charWidth = 0, cursorWidth = 0;
Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->insertWidthObj, &insertWidth);
Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->insertBorderWidthObj, &insertBorderWidth);
halfWidth = insertWidth/2;
if (textPtr->insertCursorType) {
TkTextMarkSegToIndex(textPtr, textPtr->insertMarkPtr, &index);
- TkTextIndexBbox(textPtr, &index, &ix, &iy, &iw, &ih, &charWidth);
+ TkTextIndexBbox(textPtr, &index, &ix, &iy, &iw, &ih, &charWidth,
+ &cursorWidth);
rightSideWidth = charWidth + halfWidth;
+ charWidth = cursorWidth;
} else {
rightSideWidth = halfWidth;
}