Allow any plugin to be enabled or disabled via settings

This commit is contained in:
Zachary Yedidia
2019-08-02 13:32:44 -07:00
parent 576036f251
commit a47e1f0ca5
3 changed files with 28 additions and 6 deletions

View File

@@ -365,6 +365,12 @@ func SetGlobalOptionNative(option string, nativeValue interface{}) error {
} else {
screen.Screen.EnableMouse()
}
} else {
for _, pl := range config.Plugins {
if option == pl.Name && nativeValue.(bool) && !pl.Loaded {
pl.Load()
}
}
}
for _, b := range buffer.OpenBuffers {