From 0d6fe722b85512fe0070d153408bba3e8d725b1a Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 20 Oct 2015 08:28:11 +0000 Subject: Fixed bug [1414025] - Thin insertion cursor not visible in entry --- generic/tkEntry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 6683cdc..f6ff9b9 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -1675,7 +1675,7 @@ DisplayEntry( Tk_CharBbox(entryPtr->textLayout, entryPtr->insertPos, &cursorX, NULL, NULL, NULL); cursorX += entryPtr->layoutX; - cursorX -= (entryPtr->insertWidth)/2; + cursorX -= (entryPtr->insertWidth == 1) ? 1 : (entryPtr->insertWidth)/2; Tk_SetCaretPos(entryPtr->tkwin, cursorX, baseY - fm.ascent, fm.ascent + fm.descent); if (entryPtr->insertPos >= entryPtr->leftIndex && cursorX < xBound) { -- cgit v0.12