diff options
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r-- | generic/tkTextIndex.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index 11584e8..643a845 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -3125,6 +3125,9 @@ TkTextIndexForwChars( while (*p == ' ') { ++p; } + if (*p == '\n') { + ++p; + } if (p == end) { break; } @@ -3734,7 +3737,7 @@ TkTextIndexBackChars( charCount -= 1; } } else { - skipSpaces = false; + skipSpaces = trimmed && *p == '\n'; charCount -= (type & COUNT_INDICES) ? q - p : 1; } } |