mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-05 06:30:28 +09:00
command: Fix reload command to correctly initialize and reload all runtime files (#3062)
* rtfiles: Initialize all-/realFiles and Plugins in InitRuntimeFiles * command: Reload plugins at ReloadCmd too * command: Don't reload plugins in case of ReloadConfig() * rtfiles: Split InitRuntimeFiles() into one func for assets and one for plugins * rtfiles: Remove the unnecessary init function With this modification the InitRuntimeFiles() and InitPlugins() (if needed) must be called first, otherwise uninitialized runtime file variables are most likely.
This commit is contained in:
@@ -255,6 +255,8 @@ func main() {
|
||||
}
|
||||
|
||||
config.InitRuntimeFiles()
|
||||
config.InitPlugins()
|
||||
|
||||
err = config.ReadSettings()
|
||||
if err != nil {
|
||||
screen.TermMessage(err)
|
||||
|
||||
@@ -36,6 +36,8 @@ func startup(args []string) (tcell.SimulationScreen, error) {
|
||||
}
|
||||
|
||||
config.InitRuntimeFiles()
|
||||
config.InitPlugins()
|
||||
|
||||
err = config.ReadSettings()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user