提交 f5ff9ae8 编写于 作者: J Jason Malinowski 提交者: GitHub

Merge pull request #13869 from jasonmalinowski/fix-serialization-with-missing-language-services

Fix serialization with missing language services
......@@ -56,9 +56,12 @@ internal sealed class LanguageSettingsPersister : ForegroundThreadAffinitizedObj
{
var languagePreferences = new LANGPREFERENCES3[1];
languagePreferences[0].guidLang = languageGuid;
Marshal.ThrowExceptionForHR(_textManager.GetUserPreferences4(pViewPrefs: null, pLangPrefs: languagePreferences, pColorPrefs: null));
RefreshLanguageSettings(languagePreferences);
// The function can potentially fail if that language service isn't installed
if (ErrorHandler.Succeeded(_textManager.GetUserPreferences4(pViewPrefs: null, pLangPrefs: languagePreferences, pColorPrefs: null)))
{
RefreshLanguageSettings(languagePreferences);
}
}
_textManagerEvents2Sink = ComEventSink.Advise<IVsTextManagerEvents4>(_textManager, this);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册