Limit auto-extending to click on first move of PV
authorH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 8 Sep 2014 17:06:35 +0000 (19:06 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 8 Sep 2014 17:06:35 +0000 (19:06 +0200)
Even when auto-exted on clicks on the tail of a PV will no longer cause
any moves to be added to the game. Only clicks on or before the first
move can do that now.

backend.c

index 1c4bddc..0ef05b0 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -5680,7 +5680,7 @@ LoadMultiPV (int x, int y, char *buf, int index, int *start, int *end, int pane)
        }
        ParsePV(buf+startPV, FALSE, gameMode != AnalyzeMode);
        *start = startPV; *end = index-1;
-       extendGame = (gameMode == AnalyzeMode && appData.autoExtend);
+       extendGame = (gameMode == AnalyzeMode && appData.autoExtend && origIndex - startPV < 5);
        return TRUE;
 }