Skip to content

Commit 4a9058c

Browse files
committed
buffer: Move UpdatePathGlobLocals() before updating the filetype
Like in NewBuffer(), we need to update glob-based local settings before updating the filetype, since the filetype itself may be among those glob-based local settings.
1 parent 982a4fe commit 4a9058c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/buffer/settings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212

1313
func (b *Buffer) ReloadSettings(reloadFiletype bool) {
1414
settings := config.ParsedSettings()
15+
config.UpdatePathGlobLocals(settings, b.AbsPath)
1516

1617
_, local := b.LocalSettings["filetype"]
1718
_, volatile := config.VolatileSettings["filetype"]
@@ -26,7 +27,6 @@ func (b *Buffer) ReloadSettings(reloadFiletype bool) {
2627
// update syntax rules, which will also update filetype if needed
2728
b.UpdateRules()
2829

29-
config.UpdatePathGlobLocals(settings, b.AbsPath)
3030
config.UpdateFileTypeLocals(settings, b.Settings["filetype"].(string))
3131
for k, v := range config.DefaultCommonSettings() {
3232
if k == "filetype" {

0 commit comments

Comments
 (0)