summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkEntry.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-06-11 13:07:27 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-06-11 13:07:27 (GMT)
commit94bf2a20e147c3a37f07c2a51348e3a072c4c248 (patch)
tree63ba00f6112b12af8338e2e74ddf6c6048fe8d5c /generic/ttk/ttkEntry.c
parent51f833ad40a8580d648cbd9b4f3a96352a345406 (diff)
parent725e61cc4033c4fd2cccb831bac3c997fa61e712 (diff)
downloadtk-94bf2a20e147c3a37f07c2a51348e3a072c4c248.zip
tk-94bf2a20e147c3a37f07c2a51348e3a072c4c248.tar.gz
tk-94bf2a20e147c3a37f07c2a51348e3a072c4c248.tar.bz2
fix test failure
Diffstat (limited to 'generic/ttk/ttkEntry.c')
-rw-r--r--generic/ttk/ttkEntry.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 68c281c..98c8079 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1123,7 +1123,7 @@ EntryDoLayout(void *recordPtr)
* rightIndex is set to one past the last fully-visible character.
*/
Tk_CharBbox(textLayout, leftIndex, &leftX, NULL, NULL, NULL);
- rightIndex = Tk_PointToChar(textLayout, leftX + textarea.width, 0)+1;
+ rightIndex = Tk_PointToChar(textLayout, leftX + textarea.width, 0);
entryPtr->entry.layoutX = textarea.x - leftX;
}
@@ -1163,7 +1163,7 @@ static void EntryDisplay(void *clientData, Drawable d)
Entry *entryPtr = clientData;
Tk_Window tkwin = entryPtr->core.tkwin;
int leftIndex = entryPtr->entry.xscroll.first,
- rightIndex = entryPtr->entry.xscroll.last,
+ rightIndex = entryPtr->entry.xscroll.last + 1,
selFirst = entryPtr->entry.selectFirst,
selLast = entryPtr->entry.selectLast;
EntryStyleData es;
@@ -1265,7 +1265,7 @@ static void EntryDisplay(void *clientData, Drawable d)
/* Overwrite the selected portion (if any) in the -selectforeground color:
*/
if (showSelection) {
- gc = EntryGetGC(entryPtr, es.selForegroundObj, clipRegion);
+ gc = EntryGetGC(entryPtr, es.selForegroundObj, clipRegion);
Tk_DrawTextLayout(
Tk_Display(tkwin), d, gc, entryPtr->entry.textLayout,
entryPtr->entry.layoutX, entryPtr->entry.layoutY,