VSSpellChecker
VSSpellChecker copied to clipboard
Text in TFS Pending Changes -> Comments text box always underlined
As per title: Text in TFS Pending Changes -> Comments text box always underlined, even when the words are spelled correctly:
Visual Studio: v15.9.6 VSSpellChecker: 2018.10.27.0
Thanks in advance,
Mike.
The Visual Studio textbox spell check option is only able to use the global configuration settings. If you've got a non-English dictionary selected there, it would flag all the English words as misspelled. If you right click on a misspelling, the dictionary language in use is shown after the "Add to Dictionary" option in the context menu.
Hmm, this morning all seems good:
I have seen this number of times where it is fine to start with and then at some point during the day it starts to underline everything. Could it be related to having multiple VS instances open?
For reference, I am using the en-US dictionary:
... although that doesn't show the suggestion in the TFS Comments test box.
From memory, when I did right-click on the underlined word in the TFS Comments box then it didn't give me any suggestions nor did it offer "Add to Dictionary". I think it was just Copy/Cut/Paste.
Leave it with me for the moment to see when it happens again....
Thanks,
Mike.
@EWSoftware Ok, its gone wrong again:
As mentioned above, no suggestions and no "Add to Dictionary" in the context menu.
please default add English dictionary to global dictionary.
@golavr Are you making a request to add a feature of some sort or making a suggestion to fix the issue?
@EWSoftware I ran into the same behavior and the solution for it was the one @golavr methioned: adding the en-US dictionary as a global dictionary (which it wasn't by default).
That's does fix that specific issue. But from the original post, it appears English is the default and it was happening randomly after some time. I've been trying but that behavior is not something I've been able to duplicate.
you can see i have side by side two VS2017 opened and in one i can see all the words are underlined and in one only incorrect words are underlined.
don't know what could be the problem, but sometime restarting VS fix the issue but sometime restarting VS also not fixing this issue.
I can confirm this consistently doesn’t work for me: all words are marked as misspelled with the en-US dictionary selected as the global dictionary (at the moment, I’m looking at the Git changes Comment box). 😢 [Latest build of Visual Studio 2019 + ReSharper.]
Unfortunately, I am unable to duplicate the issue. I've gone over the code and can't see anything obvious that might cause this problem. I use it and, as I mentioned above, have never seen the issue myself. If someone can give steps to reliably and consistently reproduce the issue, I can try to see if I can do the same. Another option, if you are willing is download the code and try to debug it so see if you can find the issue on your system and submit a fix.
See #272. This may be related to Resharper.
Thank you for keeping us updated, Eric. Unfortunately, ReSharper is an essential tool for many of us, so this is a kind of a showstopper. Moreover, ReSharper comes with its own spell-checker for all code windows. The bit that’s missing is precisely UI elements like the Git Comment box. I guess we’ll have to wait for VS to ship with its own spell-checker, which it should really have done by now. 🙄
@EWSoftware re: Resharper
FWIW, at the time I created this issue I was also a Resharper user, so there is at least a possible tie-in there. However, I'm afraid I'm not in a position to check this out now as I use Rider.
It looks like Resharper has a 30-day eval so I could probably install it to see if I can track down the issue now that I know what may be causing it to see if it's something I can fix in my extension.
I installed the eval version and was able to duplicate the problem. Resharper is also using NHunspell for spell checking. If it loads first, it sets the native DLL path causing the native DLLs to get loaded. When my extension then goes to set the path and load them it fails as they're already loaded and thus the spell checker never gets initialized and everything looks like it's misspelled. If you're quick enough, you can get mine to load first if you go straight into a file or load a project with editors already open. At that point, it works normally which is probably why it was so random and worked in some instances and not others.
Anyway, the fix was simple enough. Check the path in the property for copies of the native assemblies and if found, assume it's already loaded and use those. With that in place, it works as expected. I'll probably publish an update this weekend.
Thank you for fixing this so promptly, @EWSoftware. 😊 I’ve got a related question, if I may: what would the most efficient way be to configure the VS Spell Checker with ReSharper installed, so that your extension “fills the gaps” left out by the latter (UI text boxes etc.) without “doubling up” functionality anywhere else?… Or it doesn’t really matter now that your fix is in place? 🤨
You can turn off Spell Check as you Type so that it doesn't do the editor spell checking if you've got the spell checking enabled in Resharper. Resharper appears to hijack the keyboard shortcut to show its suggestions but you can still invoke mine through the tag using the mouse so you won't see mine otherwise. It doesn't hurt having mine enabled but it's extra background processing that isn't being used. Solution/Project spell checking only occurs if you invoke it, so it doesn't have to be disabled and I didn't see an equivalent in Resharper so it may be useful. Enable the Visual Studio WPF Text Box spell checking so that it spell checks things like TFS/Git commits which Resharper doesn't do.