buffer/settings: On filetype change remove the following steps

- reload runtime files
- reset globals
- parse the settings again

since this isn't the task of a filetype change.
This commit is contained in:
Jöran Karl 2024-07-16 18:20:31 +02:00
parent c67a30e611
commit 62c1c667b8

View file

@ -26,15 +26,6 @@ func (b *Buffer) SetOptionNative(option string, nativeValue interface{}) error {
} else if option == "statusline" {
screen.Redraw()
} else if option == "filetype" {
config.InitRuntimeFiles(true)
err := config.ReadSettings()
if err != nil {
screen.TermMessage(err)
}
err = config.InitGlobalSettings()
if err != nil {
screen.TermMessage(err)
}
config.InitLocalSettings(b.Settings, b.Path)
b.UpdateRules()
} else if option == "fileformat" {