Skip to content

Commit

Permalink
command: Prevent re-writing settings in case of local option
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKar committed Mar 15, 2024
1 parent 399134f commit e71dd1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/action/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,15 +533,17 @@ func SetGlobalOptionNative(option string, nativeValue interface{}) error {
}
}

var err error
if local {
MainTab().CurPane().Buf.SetOptionNative(option, nativeValue)
} else {
for _, b := range buffer.OpenBuffers {
b.SetOptionNative(option, nativeValue)
}
err = config.WriteSettings(filepath.Join(config.ConfigDir, "settings.json"))
}

return config.WriteSettings(filepath.Join(config.ConfigDir, "settings.json"))
return err
}

func SetGlobalOption(option, value string) error {
Expand Down

0 comments on commit e71dd1f

Please sign in to comment.