summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-10-22 22:07:42 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-10-22 22:07:42 (GMT)
commitf43efb6344a63c6b5ad74a5d24029d60c2a3b958 (patch)
tree52fe39f7964163fa6c33afc887949b72ed9d616a
parenta9c13ededa9d55ace5dd96b3b18bff2ff801512d (diff)
parentba91498e13eda5f5eaf354ea93cfd42e34695354 (diff)
downloadtk-f43efb6344a63c6b5ad74a5d24029d60c2a3b958.zip
tk-f43efb6344a63c6b5ad74a5d24029d60c2a3b958.tar.gz
tk-f43efb6344a63c6b5ad74a5d24029d60c2a3b958.tar.bz2
Fixed bug [1414025] - Thin insertion cursor not visible in entry
-rw-r--r--generic/tkEntry.c2
1 files changed, 1 insertions, 1 deletions
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) {