mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 06:45:40 -04:00
ReloadSettings only when we need to when saving a file (#3688)
This commit is contained in:
parent
7d16dcdaa6
commit
82b700390d
@ -322,11 +322,16 @@ func (b *Buffer) saveToFile(filename string, withSudo bool, autoSave bool) error
|
||||
}
|
||||
}
|
||||
|
||||
newPath := b.Path != filename
|
||||
b.Path = filename
|
||||
b.AbsPath = absFilename
|
||||
b.isModified = false
|
||||
b.UpdateModTime()
|
||||
b.ReloadSettings(true)
|
||||
|
||||
if newPath {
|
||||
// need to update glob-based and filetype-based settings
|
||||
b.ReloadSettings(true)
|
||||
}
|
||||
|
||||
err = b.Serialize()
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user