Skip to content

Commit 2c55fb2

Browse files
committed
adjust the initial capacity to the typical number of suggestions
1 parent 844b414 commit 2c55fb2

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
@@ -186,7 +186,7 @@ internal List<string> GetSuggestionsForError(SpellingError error)
186186
// calculate the exact same error. Keep the two methods in sync!
187187
//
188188

189-
List<string> suggestions = new();
189+
List<string> suggestions = new(4);
190190
CultureInfo culture = GetCurrentCultureAndLanguage(error.Start, out XmlLanguage language);
191191

192192
if (culture is not null || _spellerInterop.CanSpellCheck(culture))

0 commit comments

Comments
 (0)