mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-07 22:02:56 +03:00
Make gui.statusPanelView config hot-reloadable
It still doesn't update the view immediately when reloading the config, only the next time the status panel is focused. But at least it does it then; writing the code to update the panel when reloading the config is probably not justifiable.
This commit is contained in:
@@ -89,15 +89,15 @@ func (self *StatusController) onClickMain(opts gocui.ViewMouseBindingOpts) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *StatusController) GetOnRenderToMain() func() error {
|
func (self *StatusController) GetOnRenderToMain() func() error {
|
||||||
config := self.c.UserConfig().Gui
|
return func() error {
|
||||||
|
switch self.c.UserConfig().Gui.StatusPanelView {
|
||||||
switch config.StatusPanelView {
|
|
||||||
case "dashboard":
|
case "dashboard":
|
||||||
return self.showDashboard
|
return self.showDashboard()
|
||||||
case "allBranchesLog":
|
case "allBranchesLog":
|
||||||
return self.showAllBranchLogs
|
return self.showAllBranchLogs()
|
||||||
default:
|
default:
|
||||||
return self.showDashboard
|
return self.showDashboard()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user