Przeglądaj źródła

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
Malcolm Anderson 2 miesięcy temu
rodzic
commit
cf56390e81

+ 4 - 2
doc/classes/EditorSettings.xml

@@ -784,13 +784,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.

+ 1 - 1
editor/gui/editor_quick_open_dialog.cpp

@@ -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);