Cloze Deletion Bug in Add Window When Using CTRL + SHIFT + → with Internal Text

I use the CTRL + SHIFT + → shortcut in Anki to select words that I want to turn into cloze deletions. On Windows, this shortcut selects the word along with the space immediately after it.

When the text is typed directly in the Add window, or when it is copied from external applications, Anki handles this selection correctly: it removes the space from inside the cloze and places that space after the cloze, keeping the text flow correct.

However, when the text comes from inside Anki itself — for example, when I copy parts of existing cards and paste them into the Add window — a problem occurs.
In these cases, Anki keeps the space inside the cloze and attaches the next word directly to the end of the cloze.

The result looks like this:
{{c1::word }}next

But the correct behavior should be:
{{c1::word}} next

In other words, when I edit existing cards, everything works normally and as expected.
The issue appears only in the Add window, when using text copied from existing Anki cards. This suggests a possible bug in how the editor handles spaces when the content originates from inside Anki itself.

This is probably caused by non-breaking spaces.

Logged on Cloze deletion wraps non-breaking spaces · Issue #4445 · ankitects/anki · GitHub

1 Like

“Could you explain it a bit more clearly? Or maybe give me a way to solve the problem? Thanks for your help.”

You can do nothing but wait. Someone opened a PR already. Once this PR is merged and a new release is released, you have to update. Then, your issue will be solved.

2 Likes

Is there any way to follow the process of implementing the fix or even know whether it will be included in the next update package?

If you click on the linked issue above, you can see that the PR has been merged and this issue has been fixed and closed. So right now, there is nothing to follow anymore because the fix is already merged into the main branch.

Yes, it will be part of the next beta. We know that because the PR has been merged into main. And the releases will be build from main.

I do not know when the beta will be released, though it will probably be announced in Anki > Beta Testing once the release is ready. After that, the beta release will be tested. If no major issues are found, the beta becomes the public stable release (probably takes a few weeks max).

If you want to try the latest anki without waiting for a beta release, you can build it yourself: building from source – ankitects development.md on github.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.