Skip to content

Commit adcd286

Browse files
committed
properly evaluate whether we can spell-check
1 parent 2c55fb2 commit adcd286

File tree

1 file changed

+1
-1
lines changed
  • src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents

1 file changed

+1
-1
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Speller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ internal List<string> GetSuggestionsForError(SpellingError error)
189189
List<string> suggestions = new(4);
190190
CultureInfo culture = GetCurrentCultureAndLanguage(error.Start, out XmlLanguage language);
191191

192-
if (culture is not null || _spellerInterop.CanSpellCheck(culture))
192+
if (culture is not null && _spellerInterop.CanSpellCheck(culture))
193193
{
194194
ExpandToWordBreakAndContext(error.Start, LogicalDirection.Backward, language, out ITextPointer contentStart, out ITextPointer contextStart);
195195
ExpandToWordBreakAndContext(error.End, LogicalDirection.Forward, language, out ITextPointer contentEnd, out ITextPointer contextEnd);

0 commit comments

Comments
 (0)