diff options
author | fvogelnew1@free.fr <fvogel> | 2014-12-06 14:29:36 (GMT) |
---|---|---|
committer | fvogelnew1@free.fr <fvogel> | 2014-12-06 14:29:36 (GMT) |
commit | 3e4cc2c3ea8cf3afb15563e169e363b126bfbfe6 (patch) | |
tree | 798f8bec09619438368bdc0b72304ff2a6d03158 | |
parent | 5274f4e6120ee03a04f37fe43c0e12af0596fd0c (diff) | |
download | tk-3e4cc2c3ea8cf3afb15563e169e363b126bfbfe6.zip tk-3e4cc2c3ea8cf3afb15563e169e363b126bfbfe6.tar.gz tk-3e4cc2c3ea8cf3afb15563e169e363b126bfbfe6.tar.bz2 |
indexPtr->byteIndex == 0 is the beginning of a display line only if indexPtr is not elided. The start of a logical line is not always the start of a display line.
-rw-r--r-- | generic/tkTextDisp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 59efe04..ae5cdb2 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -6157,13 +6157,11 @@ GetYPixelCount( /* * For the common case where this dlPtr is also the start of the logical - * line, we can return right away. Note the implicit assumption here that - * the start of a logical line is always the start of a display line (if - * the 'elide won't elide first newline' bug is fixed, this will no longer - * necessarily be true). + * line, we can return right away. */ - if (dlPtr->index.byteIndex == 0) { + if ((dlPtr->index.byteIndex == 0) + && !TkTextIsElided(textPtr, &dlPtr->index, NULL)) { return count; } |