diff options
| author | Mario Lang <mlang@delysid.org> | 2004-01-13 09:47:28 +0000 |
|---|---|---|
| committer | Mario Lang <mlang@delysid.org> | 2004-01-13 09:47:28 +0000 |
| commit | 7be5c00b292bffee1709afa771ee9db99b7eb050 (patch) | |
| tree | 2cf538f8aa2b02377736f72f30260b32b1b481d5 | |
| parent | 9605600c114e3981b3c2e30d4e39c8f032a64c3d (diff) | |
(chess-display-set-index): If INDEX is greater than chess-game-index,
and the last ply is not final, we emit a 'forward chess-module-game event
to give ics a chance to issue "forward\n". This makes
'.' work as expected in examined games.
| -rw-r--r-- | chess-display.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chess-display.el b/chess-display.el index 98845fb..19d3ddd 100644 --- a/chess-display.el +++ b/chess-display.el @@ -222,10 +222,13 @@ also view the same game." (defun chess-display-set-index (display index) (chess-with-current-buffer display - (unless (or (not (integerp index)) - (< index 0) - (> index (chess-game-index chess-module-game))) - (chess-game-run-hooks chess-module-game 'set-index index)))) + (if (not (or (not (integerp index)) + (< index 0) + (> index (chess-game-index chess-module-game)))) + (chess-game-run-hooks chess-module-game 'set-index index) + (when (and (> index (chess-game-index chess-module-game)) + (not (chess-ply-final-p (chess-game-ply chess-module-game)))) + (chess-game-run-hooks chess-module-game 'forward))))) (defun chess-display-set-index* (display index) (chess-with-current-buffer display |
