Skip to content

Commit cf56390

Browse files
committed
Improve description of fuzzy matching in editor settings documentation
Update doc/classes/EditorSettings.xml Co-authored-by: Micky <[email protected]> Update `max_fuzzy_misses` docs and "Fuzzy Search" tooltip to match `enable_fuzzy_matching` Improve examples used and remove "middle of the filename" description Apply suggestions from code review Co-authored-by: Micky <[email protected]> Co-authored-by: A Thousand Ships <[email protected]> Update doc/classes/EditorSettings.xml Co-authored-by: Rémi Verschelde <[email protected]> Improve phrasing for `enable_fuzzy_matching` description Update doc/classes/EditorSettings.xml Co-authored-by: A Thousand Ships <[email protected]> Semicolons
1 parent d9cd011 commit cf56390

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

doc/classes/EditorSettings.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,13 +784,15 @@
784784
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.
785785
</member>
786786
<member name="filesystem/quick_open_dialog/enable_fuzzy_matching" type="bool" setter="" getter="">
787-
If [code]true[/code], fuzzy matching of search tokens is allowed.
787+
If [code]true[/code], together with exact matches of a filename, the dialog includes approximate matches.
788+
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".
789+
See also [member filesystem/quick_open_dialog/max_fuzzy_misses].
788790
</member>
789791
<member name="filesystem/quick_open_dialog/include_addons" type="bool" setter="" getter="">
790792
If [code]true[/code], results will include files located in the [code]addons[/code] folder.
791793
</member>
792794
<member name="filesystem/quick_open_dialog/max_fuzzy_misses" type="int" setter="" getter="">
793-
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].
795+
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].
794796
</member>
795797
<member name="filesystem/quick_open_dialog/max_results" type="int" setter="" getter="">
796798
Maximum number of matches to show in dialog.

editor/gui/editor_quick_open_dialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ QuickOpenResultContainer::QuickOpenResultContainer() {
265265
fuzzy_search_toggle = memnew(CheckButton);
266266
style_button(fuzzy_search_toggle);
267267
fuzzy_search_toggle->set_text(TTR("Fuzzy Search"));
268-
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."));
268+
fuzzy_search_toggle->set_tooltip_text(TTRC("Include approximate matches."));
269269
fuzzy_search_toggle->connect(SceneStringName(toggled), callable_mp(this, &QuickOpenResultContainer::_toggle_fuzzy_search));
270270
bottom_bar->add_child(fuzzy_search_toggle);
271271

0 commit comments

Comments
 (0)