summaryrefslogtreecommitdiffstats
path: root/generic/tkEntry.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-07-24 18:30:55 (GMT)
committerhobbs <hobbs>2002-07-24 18:30:55 (GMT)
commit08c61d05c28148c0356086570523ef501c2e1ae6 (patch)
tree64a316a7dfbbe00a506c6a0fa0bc808dbe47f8a9 /generic/tkEntry.c
parent06f77aa2861ce216890dd5f33ad6da6af13eff19 (diff)
downloadtk-08c61d05c28148c0356086570523ef501c2e1ae6.zip
tk-08c61d05c28148c0356086570523ef501c2e1ae6.tar.gz
tk-08c61d05c28148c0356086570523ef501c2e1ae6.tar.bz2
* generic/tkEntry.c (DisplayEntry): correct cursor position before
calling Tk_SetCaretPos. (yamamoto)
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,