mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-16 22:10:26 +00:00
ReloadSettings only when we need to when saving a file (#3688)
This commit is contained in:
parent
7d16dcdaa6
commit
82b700390d
1 changed files with 6 additions and 1 deletions
|
|
@ -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 a new issue