summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2015-10-20 08:28:11 (GMT)
committerfvogelnew1@free.fr <fvogel>2015-10-20 08:28:11 (GMT)
commit97bc0b9091635d562071782ed59d67beb238a230 (patch)
treebc415e4b2c1eb8efed5dfa137c62482111005ae4
parent276a3596a6378b08bf3a29522290f9c21760bd94 (diff)
downloadtk-97bc0b9091635d562071782ed59d67beb238a230.zip
tk-97bc0b9091635d562071782ed59d67beb238a230.tar.gz
tk-97bc0b9091635d562071782ed59d67beb238a230.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) {