pygn-mode-follow-minor-mode stopped working with the transition to tree-sitter.
There are multiple issues.
Pygn-mode must be made active in temp buffers, or the tree-sitter parse tree isn't present in those buffers, and pygn-mode motion commands have no points of reference.
In addition, before tree-sitter, the mode was lenient about the spaces in between games. Tree-siiter however, "knows" that a position in the whitespace between two games is not part of any game node -- and it only knows how to be strict about that. So we introduce a special pygn-mode-game-start-position-forgive-trailing-pos which is a quick fix and surely not the best, ultimate, general fix.
After this PR, pygn-mode-follow-minor-mode works correctly, IFF pygn-mode-next-move and pygn-mode-previous-move are used to navigate. But if I move the cursor freely through variations and comments, the "follow" board window eventually stops being updated at all, and the follow mode stops working.
pygn-mode-follow-minor-mode
stopped working with the transition to tree-sitter.There are multiple issues.
Pygn-mode must be made active in temp buffers, or the tree-sitter parse tree isn't present in those buffers, and pygn-mode motion commands have no points of reference.
In addition, before tree-sitter, the mode was lenient about the spaces in between games. Tree-siiter however, "knows" that a position in the whitespace between two games is not part of any game node -- and it only knows how to be strict about that. So we introduce a special
pygn-mode-game-start-position-forgive-trailing-pos
which is a quick fix and surely not the best, ultimate, general fix.After this PR,
pygn-mode-follow-minor-mode
works correctly, IFFpygn-mode-next-move
andpygn-mode-previous-move
are used to navigate. But if I move the cursor freely through variations and comments, the "follow" board window eventually stops being updated at all, and the follow mode stops working.So there are still more fixes to be found.