summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-09-28 19:18:45 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-09-28 19:18:45 (GMT)
commitc7d3bc05e2fead1d41a010067f32341d30aae9b2 (patch)
treecd09741dbe0d03bb986a056eae1f3579e7b9d264
parent6f2501809f0c0af439c3249038587dd32fb52593 (diff)
downloadtk-c7d3bc05e2fead1d41a010067f32341d30aae9b2.zip
tk-c7d3bc05e2fead1d41a010067f32341d30aae9b2.tar.gz
tk-c7d3bc05e2fead1d41a010067f32341d30aae9b2.tar.bz2
Slightly better fix
-rw-r--r--generic/tkTextDisp.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 892b935..e3fc5c9 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -7604,26 +7604,26 @@ TkTextCharLayoutProc(
nextX = maxX;
bytesThatFit++;
}
- if (p[bytesThatFit] == '\n') {
- /*
- * A newline character takes up no space, so if the previous
- * character fits then so does the newline.
- */
-
- bytesThatFit++;
- }
if (wrapMode == TEXT_WRAPMODE_WORD) {
while (p[bytesThatFit] == ' ') {
/*
* Space characters that would go at the beginning of the
- * next line are allocated to the present line. This gives
- * the effect of trimming white spaces at the beginning of
- * wrapped lines.
+ * next line are allocated to the current line. This gives
+ * the effect of trimming white spaces that would otherwise
+ * be seen at the beginning of wrapped lines.
*/
bytesThatFit++;
}
}
+ if (p[bytesThatFit] == '\n') {
+ /*
+ * A newline character takes up no space, so if the previous
+ * character fits then so does the newline.
+ */
+
+ bytesThatFit++;
+ }
if (bytesThatFit == 0) {
#if TK_LAYOUT_WITH_BASE_CHUNKS
chunkPtr->clientData = NULL;