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

Doesn't properly undo learning a morph when undoing the first review for a card #302

Open
IshiRenga opened this issue Aug 17, 2023 · 2 comments

Comments

@IshiRenga
Copy link

When a new card is given a grade and then is undone (e.g. ctrl+z), and when the card would have come back to be regraded, morphman pops up a message saying that a card with a morph learned today was buried and skips it.

I believe this was introduced in the latest update (v5.0-qt6-alpha.2) because burying cards with morphs learned that day was broken a while ago, but I'm not sure.

@mortii
Copy link

mortii commented Aug 17, 2023

Yeah, I'm able to reproduce the problem. Fixing it is probably going to take some finessing with collection checkpoints or something like that since multiple cards could have been buried after the grading took place. I'll try to fix it when I have time. Thanks for reporting it!

@mortii
Copy link

mortii commented Aug 21, 2023

Fixing this isn't super easy because to the undo process is fairly obfuscated, building anki from source and debugging the rust code seems to be the only way to gain some insight into it. It is further complicated by the need to keep ‘seen_morphs’ in sync with any undo and redo.

That being said it should definitely be possible, fsrs4anki-helper uses col.merge_undo_entries(), and using a custom CollectionOp is also a potential approach.

Since this is going to require a significant amount of time and effort to fix I’ll do it after having finished the new guide and fixed the browser actions.

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