settings_ui: Last minute cleanup (#40217)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ... --------- Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
@@ -269,7 +269,7 @@ async fn test_first_line_pattern(cx: &mut TestAppContext) {
|
||||
async fn test_language_for_file_with_custom_file_types(cx: &mut TestAppContext) {
|
||||
cx.update(|cx| {
|
||||
init_settings(cx, |settings| {
|
||||
settings.file_types.extend([
|
||||
settings.file_types.get_or_insert_default().extend([
|
||||
("TypeScript".into(), vec!["js".into()].into()),
|
||||
(
|
||||
"JavaScript".into(),
|
||||
|
||||
@@ -639,7 +639,7 @@ impl settings::Settings for AllLanguageSettings {
|
||||
|
||||
let mut file_types: FxHashMap<Arc<str>, GlobSet> = FxHashMap::default();
|
||||
|
||||
for (language, patterns) in &all_languages.file_types {
|
||||
for (language, patterns) in all_languages.file_types.iter().flatten() {
|
||||
let mut builder = GlobSetBuilder::new();
|
||||
|
||||
for pattern in &patterns.0 {
|
||||
@@ -778,6 +778,7 @@ impl settings::Settings for AllLanguageSettings {
|
||||
.project
|
||||
.all_languages
|
||||
.file_types
|
||||
.get_or_insert_default()
|
||||
.extend(associations);
|
||||
|
||||
// cursor global ignore list applies to cursor-tab, so transfer it to edit_predictions.disabled_globs
|
||||
|
||||
Reference in New Issue
Block a user