1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

start refactoring gui

This commit is contained in:
Jesse Duffield
2022-01-28 20:44:36 +11:00
parent fa8571e1f4
commit a90b6efded
61 changed files with 1779 additions and 1522 deletions

View File

@ -234,9 +234,9 @@ func (gui *Gui) layout(g *gocui.Gui) error {
// if the commit files view is the view to be displayed for its window, we'll display it
gui.Views.CommitFiles.Visible = gui.getViewNameForWindow(gui.State.Contexts.CommitFiles.GetWindowName()) == "commitFiles"
if gui.State.OldInformation != informationStr {
if gui.PrevLayout.Information != informationStr {
gui.setViewContent(gui.Views.Information, informationStr)
gui.State.OldInformation = informationStr
gui.PrevLayout.Information = informationStr
}
if !gui.ViewsSetup {
@ -277,9 +277,9 @@ func (gui *Gui) layout(g *gocui.Gui) error {
gui.Views.Main.SetOnSelectItem(gui.onSelectItemWrapper(gui.handlelineByLineNavigateTo))
mainViewWidth, mainViewHeight := gui.Views.Main.Size()
if mainViewWidth != gui.State.PrevMainWidth || mainViewHeight != gui.State.PrevMainHeight {
gui.State.PrevMainWidth = mainViewWidth
gui.State.PrevMainHeight = mainViewHeight
if mainViewWidth != gui.PrevLayout.MainWidth || mainViewHeight != gui.PrevLayout.MainHeight {
gui.PrevLayout.MainWidth = mainViewWidth
gui.PrevLayout.MainHeight = mainViewHeight
if err := gui.onResize(); err != nil {
return err
}