Merge pull request #107368 from Meorge/docs/what-is-fuzzy-2

Improve description of fuzzy matching in editor settings documentation
This commit is contained in:
Rémi Verschelde
2025-06-13 18:37:30 +02:00
2 changed files with 5 additions and 3 deletions

View File

@ -787,13 +787,15 @@
If set to [code]Adaptive[/code], the dialog opens in list view or grid view depending on the requested type. If set to [code]Last Used[/code], the display mode will always open the way you last used it.
</member>
<member name="filesystem/quick_open_dialog/enable_fuzzy_matching" type="bool" setter="" getter="">
If [code]true[/code], fuzzy matching of search tokens is allowed.
If [code]true[/code], together with exact matches of a filename, the dialog includes approximate matches.
This is useful for finding the correct files even when there are typos in the search query; for example, searching "nprmal" will find "normal". Additionally, it allows you to write shorter search queries; for example, searching "nml" will also find "normal".
See also [member filesystem/quick_open_dialog/max_fuzzy_misses].
</member>
<member name="filesystem/quick_open_dialog/include_addons" type="bool" setter="" getter="">
If [code]true[/code], results will include files located in the [code]addons[/code] folder.
</member>
<member name="filesystem/quick_open_dialog/max_fuzzy_misses" type="int" setter="" getter="">
The number of allowed missed query characters in a match, if fuzzy matching is enabled. For example, with the default value of 2, [code]foobar[/code] would match [code]foobur[/code] and [code]foob[/code] but not [code]foo[/code].
The number of missed query characters allowed in a match when fuzzy matching is enabled. For example, with the default value of [code]2[/code], [code]"normal"[/code] would match [code]"narmal"[/code] and [code]"norma"[/code] but not [code]"nor"[/code].
</member>
<member name="filesystem/quick_open_dialog/max_results" type="int" setter="" getter="">
Maximum number of matches to show in dialog.

View File

@ -265,7 +265,7 @@ QuickOpenResultContainer::QuickOpenResultContainer() {
fuzzy_search_toggle = memnew(CheckButton);
style_button(fuzzy_search_toggle);
fuzzy_search_toggle->set_text(TTR("Fuzzy Search"));
fuzzy_search_toggle->set_tooltip_text(TTRC("Include inexact matches or matches starting in the middle of a filename, instead of only exact matches from the beginning."));
fuzzy_search_toggle->set_tooltip_text(TTRC("Include approximate matches."));
fuzzy_search_toggle->connect(SceneStringName(toggled), callable_mp(this, &QuickOpenResultContainer::_toggle_fuzzy_search));
bottom_bar->add_child(fuzzy_search_toggle);