diff options
-rw-r--r-- | generic/tkTextDisp.c | 22 |
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; |