mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-16 22:10:26 +00:00
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:
parent
930fbea74d
commit
982a4fe065
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue