summaryrefslogtreecommitdiffstats
path: root/generic/tkEntry.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-10-20 08:28:11 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-10-20 08:28:11 (GMT)
commitba91498e13eda5f5eaf354ea93cfd42e34695354 (patch)
treebc415e4b2c1eb8efed5dfa137c62482111005ae4 /generic/tkEntry.c
parenteb5a37c2334fce11bd6b455c5a4d3aa1cb31ade3 (diff)
downloadtk-ba91498e13eda5f5eaf354ea93cfd42e34695354.zip
tk-ba91498e13eda5f5eaf354ea93cfd42e34695354.tar.gz
tk-ba91498e13eda5f5eaf354ea93cfd42e34695354.tar.bz2
Fixed bug [1414025] - Thin insertion cursor not visible in entry
Diffstat (limited to 'generic/tkEntry.c')
-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) {