summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-11-25 07:22:53 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-11-25 07:22:53 (GMT)
commitc1b04b28e254278324baf30b73f1400b4fec2f5d (patch)
tree488f2e6ce16f942a290281b14b92dc3705430ff7
parent0b0f3519d5ce4fe0cc6d26f685c6712fd013ba15 (diff)
downloadtk-c1b04b28e254278324baf30b73f1400b4fec2f5d.zip
tk-c1b04b28e254278324baf30b73f1400b4fec2f5d.tar.gz
tk-c1b04b28e254278324baf30b73f1400b4fec2f5d.tar.bz2
Ooops... removed debug traces unintentionally left in the merge mark...
-rw-r--r--generic/tkText.c8
-rw-r--r--generic/tkTextDisp.c35
2 files changed, 1 insertions, 42 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index dfcd294..4edf652 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -35,10 +35,6 @@
#include "tkText.h"
-#define LOG(toVar,what) \
- Tcl_SetVar2(textPtr->interp, toVar, NULL, (what), \
- TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT)
-
/*
* Used to avoid having to allocate and deallocate arrays on the fly for
* commonly used functions. Must be > 0.
@@ -608,9 +604,7 @@ CreateWidget(
TkTextCreateDInfo(textPtr);
TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, 0, 0,
&startIndex);
-LOG("debug", "In createWidget, before");
TkTextSetYView(textPtr, &startIndex, 0);
-LOG("debug", "In createWidget, after");
textPtr->exportSelection = 1;
textPtr->pickEvent.type = LeaveNotify;
textPtr->undo = textPtr->sharedTextPtr->undo;
@@ -2658,9 +2652,7 @@ InsertChars(
lineAndByteIndex[resetViewCount], 0, &newTop);
TkTextIndexForwBytes(tPtr, &newTop,
lineAndByteIndex[resetViewCount+1], &newTop);
-LOG("debug", "In InsertChars, before");
TkTextSetYView(tPtr, &newTop, 0);
-LOG("debug", "In InsertChars, after");
}
}
resetViewCount += 2;
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 722a137..02666d0 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -5088,14 +5088,12 @@ TkTextSetYView(
int bottomY, close, lineIndex;
TkTextIndex tmpIndex, rounded;
int lineHeight;
-char buffer[3 * TCL_INTEGER_SPACE + 1];
/*
* If the specified position is the extra line at the end of the text,
* round it back to the last real line.
*/
-LOG("debug", "\nENTERING TkTextSetYView");
lineIndex = TkBTreeLinesTo(textPtr, indexPtr->linePtr);
if (lineIndex == TkBTreeNumLines(indexPtr->tree, textPtr)) {
TkTextIndexBackChars(textPtr, indexPtr, 1, &rounded, COUNT_INDICES);
@@ -5138,10 +5136,7 @@ LOG("debug", "\nENTERING TkTextSetYView");
}
dlPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, indexPtr);
if (dlPtr != NULL) {
-LOG("debug", "It's on screen");
-sprintf(buffer, "dlPtr->y: %d dlPtr->height: %d dInfoPtr->maxY: %d", dlPtr->y, dlPtr->height, dInfoPtr->maxY);
-LOG("debug", buffer);
- if ((dlPtr->y + dlPtr->height) > dInfoPtr->maxY) {
+ if ((dlPtr->y + dlPtr->height) > dInfoPtr->maxY) {
/*
* Part of the line hangs off the bottom of the screen; pretend
* the whole line is off-screen.
@@ -5149,10 +5144,6 @@ LOG("debug", buffer);
dlPtr = NULL;
} else {
-TkTextPrintIndex(textPtr, &dlPtr->index, buffer);
-LOG("debug", buffer);
-TkTextPrintIndex(textPtr, indexPtr, buffer);
-LOG("debug", buffer);
if (TkTextIndexCmp(&dlPtr->index, indexPtr) <= 0) {
if (dInfoPtr->dLinePtr == dlPtr && dInfoPtr->topPixelOffset != 0) {
/*
@@ -5176,16 +5167,9 @@ LOG("debug", buffer);
* If the line is not close, place it in the center of the window.
*/
-LOG("debug", "Not yet on screen");
tmpIndex = *indexPtr;
-TkTextPrintIndex(textPtr, &tmpIndex, buffer);
-LOG("debug", buffer);
TkTextFindDisplayLineEnd(textPtr, &tmpIndex, 0, NULL);
-TkTextPrintIndex(textPtr, &tmpIndex, buffer);
-LOG("debug", buffer);
lineHeight = CalculateDisplayLineHeight(textPtr, &tmpIndex, NULL, NULL);
- sprintf(buffer, "lineHeight: %d", lineHeight);
-LOG("debug", buffer);
/*
* It would be better if 'bottomY' were calculated using the actual height
@@ -5194,14 +5178,11 @@ LOG("debug", buffer);
bottomY = (dInfoPtr->y + dInfoPtr->maxY + lineHeight)/2;
close = (dInfoPtr->maxY - dInfoPtr->y)/3;
-sprintf(buffer, "bottomY: %d close: %d", bottomY, close);
-LOG("debug", buffer);
if (close < 3*textPtr->charHeight) {
close = 3*textPtr->charHeight;
}
if (dlPtr != NULL) {
int overlap;
-LOG("debug", "Above the top of the screen");
/*
* The desired line is above the top of screen. If it is "close" to
@@ -5220,7 +5201,6 @@ LOG("debug", "Above the top of the screen");
}
} else {
int overlap;
-LOG("debug", "Below the top of the screen");
/*
* The desired line is below the bottom of the screen. If it is
@@ -5230,14 +5210,8 @@ LOG("debug", "Below the top of the screen");
MeasureUp(textPtr, indexPtr, close + lineHeight
- textPtr->charHeight/2, &tmpIndex, &overlap);
-TkTextPrintIndex(textPtr, &tmpIndex, buffer);
-LOG("debug", buffer);
-sprintf(buffer, "overlap: %d", overlap);
-LOG("debug", buffer);
if (FindDLine(textPtr, dInfoPtr->dLinePtr, &tmpIndex) != NULL) {
bottomY = dInfoPtr->maxY - dInfoPtr->y;
-sprintf(buffer, "New bottomY: %d", bottomY);
-LOG("debug", buffer);
}
}
@@ -5249,15 +5223,8 @@ LOG("debug", buffer);
* of the window.
*/
-TkTextPrintIndex(textPtr, indexPtr, buffer);
-LOG("debug", buffer);
MeasureUp(textPtr, indexPtr, bottomY, &textPtr->topIndex,
&dInfoPtr->newTopPixelOffset);
-//dInfoPtr->newTopPixelOffset = 0;
-TkTextPrintIndex(textPtr, &textPtr->topIndex, buffer);
-LOG("debug", buffer);
-sprintf(buffer, "newTopPixelOffset: %d", dInfoPtr->newTopPixelOffset);
-LOG("debug", buffer);
scheduleUpdate:
if (!(dInfoPtr->flags & REDRAW_PENDING)) {