1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +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:
Stefan Haller
2024-07-30 14:40:26 +02:00
parent 04d7907864
commit 5872779faa

View File

@ -89,15 +89,15 @@ func (self *StatusController) onClickMain(opts gocui.ViewMouseBindingOpts) error
}
func (self *StatusController) GetOnRenderToMain() func() error {
config := self.c.UserConfig().Gui
switch config.StatusPanelView {
case "dashboard":
return self.showDashboard
case "allBranchesLog":
return self.showAllBranchLogs
default:
return self.showDashboard
return func() error {
switch self.c.UserConfig().Gui.StatusPanelView {
case "dashboard":
return self.showDashboard()
case "allBranchesLog":
return self.showAllBranchLogs()
default:
return self.showDashboard()
}
}
}