X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=history.c;h=7c64582a70c6fa2b2c45b6c5e837428f4447686c;hb=08a38fdd71f1fae28fb213d4c5f6fb0834967412;hp=503f6a0c69126f3a3d5b97dc877b5c43e6899a56;hpb=2c2c75c017b5d8c3ce7f6b06e4b5fc3a5dc92fde;p=xboard.git diff --git a/history.c b/history.c index 503f6a0..7c64582 100644 --- a/history.c +++ b/history.c @@ -50,6 +50,7 @@ typedef char MoveHistoryString[ MOVE_LEN*2 ]; static int lastFirst = 0; static int lastLast = 0; static int lastCurrent = -1; +static int lastGames; static char lastLastMove[ MOVE_LEN ]; @@ -79,7 +80,7 @@ static Boolean OnlyCurrentPositionChanged() currFirst == lastFirst && currLast == lastLast && currCurrent >= 0 && - TRUE ) + lastGames == storedGames ) { result = TRUE; @@ -105,7 +106,7 @@ static Boolean OneMoveAppended() lastLast == (currLast-1) && lastCurrent == (currCurrent-1) && currCurrent == (currLast-1) && - TRUE ) + lastGames == storedGames ) { result = TRUE; } @@ -175,11 +176,11 @@ void MemoContentUpdated() int caretPos; if(lastCurrent <= currLast) DoHighlight( lastCurrent, FALSE ); - DoHighlight( currCurrent, TRUE ); lastFirst = currFirst; lastLast = currLast; lastCurrent = currCurrent; + lastGames = storedGames; lastLastMove[0] = '\0'; if( lastLast > 0 ) { @@ -195,6 +196,7 @@ void MemoContentUpdated() } ScrollToCurrent(caretPos); + DoHighlight( currCurrent, TRUE ); // [HGM] moved last, because in X some scrolling methods spoil highlighting } // back-end. Must be called as double-click call-back on move-history text edit