summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-11-28 19:45:01 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-11-28 19:45:01 (GMT)
commit14e20d7a1a609c613be7d73cf84abe1011876b17 (patch)
tree25422f71bf65b1db89584a001d6a949ee031bd41 /generic/tkTextDisp.c
parentb869b3c26e93113c398a7f7794aaeea9182fbd32 (diff)
downloadtk-14e20d7a1a609c613be7d73cf84abe1011876b17.zip
tk-14e20d7a1a609c613be7d73cf84abe1011876b17.tar.gz
tk-14e20d7a1a609c613be7d73cf84abe1011876b17.tar.bz2
[.text pendingsync] returns a boolean
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index d8a17a9..d214fa7 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -6101,12 +6101,11 @@ TkTextYviewCmd(
*
* TkTextPendingsync --
*
- * This function computes how many lines are not up-to-date regarding
- * asynchronous height calculations.
+ * This function checks if any line heights are not up-to-date.
*
* Results:
- * Returns a positive integer corresponding to the number of lines for
- * which the height is outdated.
+ * Returns a boolean true if it is the case, or false if all line
+ * heights are up-to-date.
*
* Side effects:
* None.
@@ -6114,13 +6113,15 @@ TkTextYviewCmd(
*--------------------------------------------------------------
*/
-int
+Bool
TkTextPendingsync(
TkText *textPtr) /* Information about text widget. */
{
TextDInfo *dInfoPtr = textPtr->dInfoPtr;
- return (dInfoPtr->lastMetricUpdateLine - dInfoPtr->currentMetricUpdateLine);
+ return (
+ (dInfoPtr->lastMetricUpdateLine - dInfoPtr->currentMetricUpdateLine) ?
+ 1 : 0);
}
/*