diff options
author | fvogel <fvogelnew1@free.fr> | 2014-12-28 15:09:46 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2014-12-28 15:09:46 (GMT) |
commit | c496046c21dec2ceef5e03a5205ea6d0cc0fde9f (patch) | |
tree | c7b13a8f27463634eb4f70368094858903575a0f /generic | |
parent | e82344febcb887018ba3a050045fe61eb259268f (diff) | |
download | tk-c496046c21dec2ceef5e03a5205ea6d0cc0fde9f.zip tk-c496046c21dec2ceef5e03a5205ea6d0cc0fde9f.tar.gz tk-c496046c21dec2ceef5e03a5205ea6d0cc0fde9f.tar.bz2 |
Fixed Bad counting of the total number of vertical pixels in the text widget, resulting in small change of the Y scrollbar size. Happened because CalculateDisplayLineHeight expects an index at start of a display line, which was not always the case.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTextDisp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index f99ecd8..ae9c341 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -3711,6 +3711,20 @@ TkTextUpdateOneLine( } /* + * CalculateDisplayLineHeight _must_ be called (below) with an index at + * the beginning of a display line. Force this to happen. This is needed + * when TkTextUpdateOneLine is called with a line that is merged with its + * previous line: the number of merged logical lines in a display line is + * calculated correctly only when CalculateDisplayLineHeight receives + * an index at the beginning of a display line. In turn this causes the + * merged lines to receive their correct zero pixel height in + * TkBTreeAdjustPixelHeight. + */ + + TkTextFindDisplayLineEnd(textPtr, indexPtr, 0, NULL); + linePtr = indexPtr->linePtr; + + /* * Iterate through all display-lines corresponding to the single logical * line 'linePtr' (and lines merged into this line due to eol elision), * adding up the pixel height of each such display line as we go along. |