summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-10-22 22:11:42 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-10-22 22:11:42 (GMT)
commit42939d89e12b3dcea975198baba5fdbdc1c66273 (patch)
tree1fc3d8799a06dc85f03cfd0235321e8563122888
parent595eace0269aaad7d90d14c8e09cdabef3d346a0 (diff)
parentc8f3579bc34bec580577b6955087e17abdef383a (diff)
downloadtk-42939d89e12b3dcea975198baba5fdbdc1c66273.zip
tk-42939d89e12b3dcea975198baba5fdbdc1c66273.tar.gz
tk-42939d89e12b3dcea975198baba5fdbdc1c66273.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 3ad9acd..036d1e2 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -1680,7 +1680,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) {