From afcb734b051b7d9873d15d3ce4330960c17e15b8 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 2 May 2021 13:28:07 +0000 Subject: Backout previous commit, this is not the right way. --- generic/ttk/ttkEntry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 6898fe1..36e613e 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1393,7 +1393,7 @@ EntryIndex( const char *string; if (TCL_OK == TkGetIntForIndex(indexObj, entryPtr->entry.numChars - 1, 1, &idx)) { - if (idx < 0) { + if (idx == TCL_INDEX_NONE) { idx = 0; } else if (idx > entryPtr->entry.numChars) { idx = entryPtr->entry.numChars; -- cgit v0.12