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
Fix issues with Windows and Mac checking, reduce noise #332
Conversation
- Added `debug` for tracking down issues. Use `localStorage.debug = 'spell-check:*'` to enable.
As usual, please squash on merge. This commit graph is messy. |
Tested on Win10 with By default
Checking only
Adding a second system dictionary
A nitpick: EDIT: Just saw your #328 (comment) and to cross post:
This doesn't happen as noted above - I guess because with |
@ashthespy, let's see why that is happening. I did end up switching branches to https://github.com/dmoonfire/spell-check/tree/locale-issues-tests so the code is there (I wrote a test to prove I broke it before merging the I wasn't logging the output from the individual locales. Would you be willing to grab the latest and try again. The entire plugin system is supposed to allow system and locales to coexist (in your case, 1 system + 2 locale are being used in your example). In this case, system will not return anything, but the locales should. |
@dmoonfire with your latest logging tweaks we get more insight! PS: the old tests were on the PR branch.. |
@ashthespy Well, the locale checking is working correctly judging from the "(2) {..}" line. I just pushed up another commit that adds logging on the next layer out to see why it isn't coordinating the changes between the two. |
I think I found the current problem, I'm trying to figure out why this isn't working on a Windows machine. |
@dmoonfire Not sure how the intersection logic works, but it doesn't seem to work right in this case. I added some more logging: @@ -180,8 +180,10 @@ class SpellCheckerManager
# Remove all of the confirmed correct words from the resulting incorrect
# list. This allows us to have correct-only providers as opposed to only
# incorrect providers.
- if correct.ranges.length > 0
- intersection.subtract(correct)
+ @log 'intersection_before_correctiong', intersection
+ @log 'correct', correct.ranges
+ # if correct.ranges.length > 0
+ # intersection.subtract(correct) Which gives: Lol. And you can also see how much I depend on spellcheck. :-D |
Yeah, I'm getting strange behavior that doesn't make sense to me. That's what I'm tracking down. I'm populating the range inside the loop, but when I go to push it, it's pushing up an empty list. :( But, I have a temporary Windows machine so I'm tracing through the code there to look at it. |
Okay, the problem. When I split the checking into system and locale, system checking was enabled for both Windows and Macs (as it was previously) but it was also tied into looping through locale code (but wasn't after the split). System checking produces a check result that sets However, with system check not producing good results in this case, it is saying nothing is incorrect, which means everything is correct because of Now, the Mac is supposed to handle |
@ashthespy, okay, now it should work. :) |
@dmoonfire Can confirm the latest fixes work for me with both |
Thanks @ashthespy for testing this out and thanks @dmoonfire for the great support |
Thank You all |
|
Description of the Change
The recent changes to split system and locale checkers have caused some trouble with Windows Spell Checking and spurious warnings on Mac. This is to resolve them as described in #328. In specific:
Many of these issues also show up when the default locale is not
en-US
.Alternate Designs
The main difficulty is coordinating the various rules that have to be applied:
The resulting fix was basically to smooth over some of the issues with these various conditions.
Benefits
This will benefit most users who want spelling to work in these conditions and not see warnings without unchecking "Use Locales".
I also noticed that there was some confusion on how to set up dictionaries and attempted to clarify the instructions to include more details in the
README.md
.Possible Drawbacks
There are a lot of situations where one thing works and another doesn't. Someone may expect to see a warning that won't, but folks should not see more warnings.
Also, Dylan is unable to test on Windows or Mac, so extra care or verification would be greatly appreciated on those platforms.
Applicable Issues