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

Deactivating "Check Spelling" does not remove visual indicators #1414

Closed
HeyMyian opened this issue Apr 13, 2023 · 4 comments · Fixed by #1416
Closed

Deactivating "Check Spelling" does not remove visual indicators #1414

HeyMyian opened this issue Apr 13, 2023 · 4 comments · Fixed by #1416
Assignees
Labels
bug Issue: Something isn't working
Milestone

Comments

@HeyMyian
Copy link
Contributor

Not sure if bug, but this seems like unusual behavior. If I want to completely deactivate the visual indicators of the spell checking, I have to also close the document and reopen it.

@HeyMyian HeyMyian added the bug Issue: Something isn't working label Apr 13, 2023
@vkbo
Copy link
Owner

vkbo commented Apr 13, 2023

The visual result of the spell checking is generated by the syntax highlighter. Toggling it should trigger a new refresh of the highlighting for the whole document, at least it used to, but I can look into whether there is a bug somewhere in the pipeline.

The decision to highlight is made by the editor, and the user interaction bounces around a bit in the code, so it may fail somewhere in some cases. A few issues are known, for instance with a misconfigured dictionary setting.

@vkbo vkbo self-assigned this Apr 13, 2023
@vkbo vkbo added this to the Release 2.0.7 milestone Apr 13, 2023
@vkbo
Copy link
Owner

vkbo commented Apr 13, 2023

Tested and confirmed. The code to refresh spellchecking is called, but it actually only runs if spell checking is enabled, which it isn't if you turn off spell checking. Basically, it will refresh when enabling spell checking, but not the reverse.

Edit: You don't have to close/reopen actually. You can just rerun the spell checker with the toggle off.

@HeyMyian
Copy link
Contributor Author

Edit: You don't have to close/reopen actually. You can just rerun the spell checker with the toggle off.

That does not work for me. Situation is: Spell check is on. I disable spell check. I rerun spell check. --> Nothing changes, the squiggly lines remain.

@vkbo
Copy link
Owner

vkbo commented Apr 13, 2023

That does not work for me. Situation is: Spell check is on. I disable spell check. I rerun spell check. --> Nothing changes, the squiggly lines remain.

Yeah, I just realised that the same if-condition I removed also blocks that. It will work after the fix.

The fix only fixes it for small documents though, but that as is expected. For big documents, all running of the spell checker is done manually due to performance reasons. The definition of a big document is set in Preferences, but defaults to 800 kB. You'll only be able to reach that limit if you put a full novel in a single document, so it's a non-issue in most cases. The main exception is if you import a single document novel and want to split it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue: Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants