Also limit the number of search terms (as well as their length)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19464
This commit is contained in:
Jeff Young
2025-01-13 16:22:37 +00:00
parent e7a79216ab
commit 577c1dd332
2 changed files with 11 additions and 7 deletions
+2 -2
View File
@@ -488,8 +488,8 @@ int EDA_COMBINED_MATCHER::ScoreTerms( std::vector<SEARCH_TERM>& aWeightedTerms )
// Don't cause KiCad to hang if someone accidentally pastes the PCB or schematic
// into the search box.
if( term.Text.Length() > 5000 )
term.Text = term.Text.Left( 5000 );
if( term.Text.Length() > 1000 )
term.Text = term.Text.Left( 1000 );
term.Normalized = true;
}