mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-04 22:20:20 +09: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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user