summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-07-24 18:30:55 (GMT)
committerhobbs <hobbs>2002-07-24 18:30:55 (GMT)
commita4cd1f0072763a70b0562a055503ffab26488db2 (patch)
tree64a316a7dfbbe00a506c6a0fa0bc808dbe47f8a9
parentf2da3f81ee2ba034359334491059605863e2ba82 (diff)
downloadtk-a4cd1f0072763a70b0562a055503ffab26488db2.zip
tk-a4cd1f0072763a70b0562a055503ffab26488db2.tar.gz
tk-a4cd1f0072763a70b0562a055503ffab26488db2.tar.bz2
* generic/tkEntry.c (DisplayEntry): correct cursor position before
calling Tk_SetCaretPos. (yamamoto)
-rw-r--r--generic/tkEntry.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 87a726c..7d78d8a 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkEntry.c,v 1.28 2002/04/05 08:43:22 hobbs Exp $
+ * RCS: @(#) $Id: tkEntry.c,v 1.29 2002/07/24 18:30:55 hobbs Exp $
*/
#include "tkInt.h"
@@ -1897,11 +1897,11 @@ DisplayEntry(clientData)
if ((entryPtr->state == STATE_NORMAL) && (entryPtr->flags & GOT_FOCUS)) {
Tk_CharBbox(entryPtr->textLayout, entryPtr->insertPos, &cursorX, NULL,
NULL, NULL);
+ cursorX += entryPtr->layoutX;
+ cursorX -= (entryPtr->insertWidth)/2;
Tk_SetCaretPos(entryPtr->tkwin, cursorX, baseY - fm.ascent,
fm.ascent + fm.descent);
if (entryPtr->insertPos >= entryPtr->leftIndex) {
- cursorX += entryPtr->layoutX;
- cursorX -= (entryPtr->insertWidth)/2;
if (cursorX < xBound) {
if (entryPtr->flags & CURSOR_ON) {
Tk_Fill3DRectangle(tkwin, pixmap, entryPtr->insertBorder,