summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2012-05-17 18:28:39 (GMT)
committerfvogel <fvogelnew1@free.fr>2012-05-17 18:28:39 (GMT)
commit80e6d08fdcb016f24f236760cef472a7465a12d5 (patch)
tree54b7e5816bec1bd587394bd9fd96980f194835bb
parenta6c84ba46ba6fdbc4d426916fae067f8af6ef1e4 (diff)
downloadtk-80e6d08fdcb016f24f236760cef472a7465a12d5.zip
tk-80e6d08fdcb016f24f236760cef472a7465a12d5.tar.gz
tk-80e6d08fdcb016f24f236760cef472a7465a12d5.tar.bz2
Better fix for bug-1630254bug_1630254
-rw-r--r--generic/tkTextDisp.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 13695e8..7891a2c 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -2005,21 +2005,9 @@ UpdateDisplayInfo(
* widget.
*/
- if (textPtr->start == textPtr->end) {
- /*
- * Empty peer widget.
- */
- lineNum = -1;
- bytesToCount = 0; /* Stop compiler warning. */
- } else {
- /*
- * Widget that was empty, but no longer is.
- * (Bug 1630254)
- */
- lineNum = TkBTreeNumLines(textPtr->sharedTextPtr->tree,
- textPtr) - 1;
- bytesToCount = INT_MAX;
- }
+ lineNum = TkBTreeNumLines(textPtr->sharedTextPtr->tree,
+ textPtr) - 1;
+ bytesToCount = INT_MAX;
} else {
lineNum = TkBTreeLinesTo(textPtr,
dInfoPtr->dLinePtr->index.linePtr);