X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=engineoutput.c;h=00859bfba8326be5d4c82502bdcfc43dfa649892;hb=4874d4beeab3424c79e343c5be80f4dd7eea8808;hp=22b008c19f5d837f6a71d90993e878eccb387dae;hpb=5521c2e29fe766689f495e85c062c491f99f0405;p=xboard.git diff --git a/engineoutput.c b/engineoutput.c index 22b008c..00859bf 100644 --- a/engineoutput.c +++ b/engineoutput.c @@ -70,6 +70,7 @@ static void UpdateControls( EngineOutputData * ed ); static int lastDepth[2] = { -1, -1 }; static int lastForwardMostMove[2] = { -1, -1 }; static int engineState[2] = { -1, -1 }; +static char lastLine[2][MSG_SIZ]; #define MAX_VAR 400 static int scores[MAX_VAR], textEnd[MAX_VAR], curDepth[2], nrVariations[2]; @@ -163,7 +164,13 @@ void SetProgramStats( FrontEndProgramStats * stats ) // now directly called by b clearMemo = TRUE; } - if( clearMemo ) { DoClearMemo(which); nrVariations[which] = 0; } + if( clearMemo ) { + DoClearMemo(which); nrVariations[which] = 0; + if(appData.ponderNextMove && lastLine[which][0]) { + InsertIntoMemo( which, lastLine[which], 0 ); + InsertIntoMemo( which, "\n", 0 ); + } + } /* Update */ lastDepth[which] = depth == 1 && ed.nodes == 0 ? 0 : depth; // [HGM] info-line kudge @@ -476,6 +483,7 @@ static void UpdateControls( EngineOutputData * ed ) /* Update memo */ InsertIntoMemo( ed->which, buf, InsertionPoint(strlen(buf), ed) ); + strncpy(lastLine[ed->which], buf, MSG_SIZ); } /* Colors */