Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

follow-minor-mode stops working after free motion #182

Open
3 tasks
rolandwalker opened this issue Sep 11, 2021 · 2 comments
Open
3 tasks

follow-minor-mode stops working after free motion #182

rolandwalker opened this issue Sep 11, 2021 · 2 comments

Comments

@rolandwalker
Copy link
Collaborator

From #174 :

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.

We need to

dekrueger pushed a commit to dekrueger/pygn-mode that referenced this issue May 12, 2023
…owing

Addresses some of the issues causing failure of pygn-mode-follow-minor-mode.

See dwcoates#182

This commit address the following issues:

1. pygn-mode-pgn-at-pos-as-if-variation can return nil, causing an
   error when attempting to insert that into the buffer.

2. pygn-mode-pgn-at-pos-as-if-variation does not append a game
   termination marker to the pgn, but pygn-mode-display-board-at-pos
   seems to need one.

3. pygn-mode-display-board-at-pos does not show the final position
   when the point is at the termination marker.

These changes allow follow-minor-mode to function in the main line of
games. But, it still fails when inside variations.
@dekrueger
Copy link

I added the above commit to get following semi-working. It still doesn't function in variations, probably due to errors in pgn-at-pos-as-if-variation. I tried to be expansive in the commit message. Hopefully it can help you track down this issue.

@rolandwalker
Copy link
Collaborator Author

@dekrueger Hi! Please PR if that's a partial fix. My assumption is that the tree-sitter port broke navigation, and that navigation could now be simplified.

dekrueger pushed a commit to dekrueger/pygn-mode that referenced this issue Jun 5, 2023
Updated pygn-mode-pgn-at-pos and pygn-mode-pgn-at-pos-as-if-variation
to create PGN strings by walking tree-sitter nodes.

This change allows pygn-mode-follow-minor-mode to operate correctly
after free movement. See dwcoates#182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants