mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-19 15:25:42 -04:00
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.
This commit is contained in:
parent
982a4fe065
commit
4a9058c3bd
@ -12,6 +12,7 @@ import (
|
|||||||
|
|
||||||
func (b *Buffer) ReloadSettings(reloadFiletype bool) {
|
func (b *Buffer) ReloadSettings(reloadFiletype bool) {
|
||||||
settings := config.ParsedSettings()
|
settings := config.ParsedSettings()
|
||||||
|
config.UpdatePathGlobLocals(settings, b.AbsPath)
|
||||||
|
|
||||||
_, local := b.LocalSettings["filetype"]
|
_, local := b.LocalSettings["filetype"]
|
||||||
_, volatile := config.VolatileSettings["filetype"]
|
_, volatile := config.VolatileSettings["filetype"]
|
||||||
@ -26,7 +27,6 @@ func (b *Buffer) ReloadSettings(reloadFiletype bool) {
|
|||||||
// update syntax rules, which will also update filetype if needed
|
// update syntax rules, which will also update filetype if needed
|
||||||
b.UpdateRules()
|
b.UpdateRules()
|
||||||
|
|
||||||
config.UpdatePathGlobLocals(settings, b.AbsPath)
|
|
||||||
config.UpdateFileTypeLocals(settings, b.Settings["filetype"].(string))
|
config.UpdateFileTypeLocals(settings, b.Settings["filetype"].(string))
|
||||||
for k, v := range config.DefaultCommonSettings() {
|
for k, v := range config.DefaultCommonSettings() {
|
||||||
if k == "filetype" {
|
if k == "filetype" {
|
||||||
|
Loading…
Reference in New Issue
Block a user