diff options
author | hobbs <hobbs> | 2002-04-05 08:43:22 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-04-05 08:43:22 (GMT) |
commit | edf6ae717ffa12d49b2c5163c7d44c7fa3693020 (patch) | |
tree | 55f527c63b4eba804a1795e9c2bce98a3c9cf691 /generic/tkTextMark.c | |
parent | 418747a5b52e2e7ce5996ae49861c7904bc77197 (diff) | |
download | tk-edf6ae717ffa12d49b2c5163c7d44c7fa3693020.zip tk-edf6ae717ffa12d49b2c5163c7d44c7fa3693020.tar.gz tk-edf6ae717ffa12d49b2c5163c7d44c7fa3693020.tar.bz2 |
* win/tkWinButton.c (TkpDisplayButton):
* generic/tkTextMark.c (TkTextInsertDisplayProc):
* generic/tkCanvText.c (DisplayCanvText):
* generic/tkEntry.c (DisplayEntry): added Tk_SetCaretPos calls.
Diffstat (limited to 'generic/tkTextMark.c')
-rw-r--r-- | generic/tkTextMark.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c index ff3ef44..3e97d7f 100644 --- a/generic/tkTextMark.c +++ b/generic/tkTextMark.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTextMark.c,v 1.4 1999/12/14 06:52:33 hobbs Exp $ + * RCS: @(#) $Id: tkTextMark.c,v 1.5 2002/04/05 08:43:22 hobbs Exp $ */ #include "tkInt.h" @@ -526,12 +526,16 @@ TkTextInsertDisplayProc(chunkPtr, x, y, height, baseline, display, dst, screenY) if ((x + halfWidth) < 0) { /* - * The insertion cursor is off-screen. Just return. + * The insertion cursor is off-screen. + * Indicate caret at 0,0 and return. */ + Tk_SetCaretPos(textPtr->tkwin, 0, 0, height); return; } + Tk_SetCaretPos(textPtr->tkwin, x - halfWidth, screenY, height); + /* * As a special hack to keep the cursor visible on mono displays * (or anywhere else that the selection and insertion cursors @@ -542,12 +546,12 @@ TkTextInsertDisplayProc(chunkPtr, x, y, height, baseline, display, dst, screenY) if (textPtr->flags & INSERT_ON) { Tk_Fill3DRectangle(textPtr->tkwin, dst, textPtr->insertBorder, - x - textPtr->insertWidth/2, y, textPtr->insertWidth, - height, textPtr->insertBorderWidth, TK_RELIEF_RAISED); + x - halfWidth, y, textPtr->insertWidth, height, + textPtr->insertBorderWidth, TK_RELIEF_RAISED); } else if (textPtr->selBorder == textPtr->insertBorder) { Tk_Fill3DRectangle(textPtr->tkwin, dst, textPtr->border, - x - textPtr->insertWidth/2, y, textPtr->insertWidth, - height, 0, TK_RELIEF_FLAT); + x - halfWidth, y, textPtr->insertWidth, height, + 0, TK_RELIEF_FLAT); } } |