summaryrefslogtreecommitdiffstats
path: root/generic/tkEntry.c
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2002-07-24 18:30:54 (GMT)
committerhobbs <hobbs@noemail.net>2002-07-24 18:30:54 (GMT)
commit589decafafaf0bd99e8a5dd685044d65e1f7b0d1 (patch)
tree64a316a7dfbbe00a506c6a0fa0bc808dbe47f8a9 /generic/tkEntry.c
parentc5d56fa7309ab75936a1283f4281274f2a2dbb23 (diff)
downloadtk-589decafafaf0bd99e8a5dd685044d65e1f7b0d1.zip
tk-589decafafaf0bd99e8a5dd685044d65e1f7b0d1.tar.gz
tk-589decafafaf0bd99e8a5dd685044d65e1f7b0d1.tar.bz2
* generic/tkEntry.c (DisplayEntry): correct cursor position before
calling Tk_SetCaretPos. (yamamoto) FossilOrigin-Name: 0203a5d7f58b7acdf4a5f7a1cefd4e0279ab60dc
Diffstat (limited to 'generic/tkEntry.c')
-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,