Skip to content

Commit 80fd58e

Browse files
Fixing settings not being applied when saving as a new file
1 parent f5debdf commit 80fd58e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/buffer/save.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ func (b *Buffer) saveToFile(filename string, withSudo bool, autoSave bool) error
232232
absPath, _ := filepath.Abs(filename)
233233
b.AbsPath = absPath
234234
b.isModified = false
235+
ft := b.FileType()
235236
b.UpdateRules()
237+
if b.FileType() != ft {
238+
b.ReloadSettings(true)
239+
}
236240
return err
237241
}

0 commit comments

Comments
 (0)