summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2015-11-28 19:45:01 (GMT)
committerfvogelnew1@free.fr <fvogel>2015-11-28 19:45:01 (GMT)
commit66ac50023acbb2146b7cb5ebc9c8488a3267fab7 (patch)
tree25422f71bf65b1db89584a001d6a949ee031bd41 /generic/tkTextDisp.c
parent2112b5a6f771e9d07ec024d0ab1a1e0f7a80f1de (diff)
downloadtk-66ac50023acbb2146b7cb5ebc9c8488a3267fab7.zip
tk-66ac50023acbb2146b7cb5ebc9c8488a3267fab7.tar.gz
tk-66ac50023acbb2146b7cb5ebc9c8488a3267fab7.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);
}
/*