config: Prevent the update of filetype by UpdateFileTypeLocals()

This shall prevent unpredictable results caused by such a user configuration:

```
"ft:go" {
	"filetype": "c"
}
```
This commit is contained in:
Jöran Karl
2025-02-18 21:17:30 +01:00
parent 930fbea74d
commit 982a4fe065

View File

@@ -312,7 +312,9 @@ func UpdateFileTypeLocals(settings map[string]interface{}, filetype string) {
if strings.HasPrefix(reflect.TypeOf(v).String(), "map") && strings.HasPrefix(k, "ft:") {
if filetype == k[3:] {
for k1, v1 := range v.(map[string]interface{}) {
settings[k1] = v1
if k1 != "filetype" {
settings[k1] = v1
}
}
}
}