mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-27 22:38:09 +02:00
remove redundant popup checks
This commit is contained in:
@@ -181,10 +181,6 @@ func (gui *Gui) handleRefresh() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) handleMouseDownMain() error {
|
func (gui *Gui) handleMouseDownMain() error {
|
||||||
if gui.popupPanelFocused() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
switch gui.currentSideContext() {
|
switch gui.currentSideContext() {
|
||||||
case gui.State.Contexts.Files:
|
case gui.State.Contexts.Files:
|
||||||
// set filename, set primary/secondary selected, set line number, then switch context
|
// set filename, set primary/secondary selected, set line number, then switch context
|
||||||
@@ -199,10 +195,6 @@ func (gui *Gui) handleMouseDownMain() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) handleMouseDownSecondary() error {
|
func (gui *Gui) handleMouseDownSecondary() error {
|
||||||
if gui.popupPanelFocused() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
switch gui.g.CurrentView() {
|
switch gui.g.CurrentView() {
|
||||||
case gui.Views.Files:
|
case gui.Views.Files:
|
||||||
return gui.Controllers.Files.EnterFile(types.OnFocusOpts{ClickedViewName: "secondary", ClickedViewLineIdx: gui.Views.Secondary.SelectedLineIdx()})
|
return gui.Controllers.Files.EnterFile(types.OnFocusOpts{ClickedViewName: "secondary", ClickedViewLineIdx: gui.Views.Secondary.SelectedLineIdx()})
|
||||||
|
|||||||
@@ -106,10 +106,6 @@ func (gui *Gui) refreshAndFocusLblPanel(state *LblPanelState) error {
|
|||||||
|
|
||||||
func (gui *Gui) handleLBLMouseDown() error {
|
func (gui *Gui) handleLBLMouseDown() error {
|
||||||
return gui.withLBLActiveCheck(func(state *LblPanelState) error {
|
return gui.withLBLActiveCheck(func(state *LblPanelState) error {
|
||||||
if gui.popupPanelFocused() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
state.SelectNewLineForRange(gui.Views.Main.SelectedLineIdx())
|
state.SelectNewLineForRange(gui.Views.Main.SelectedLineIdx())
|
||||||
|
|
||||||
return gui.refreshAndFocusLblPanel(state)
|
return gui.refreshAndFocusLblPanel(state)
|
||||||
@@ -118,10 +114,6 @@ func (gui *Gui) handleLBLMouseDown() error {
|
|||||||
|
|
||||||
func (gui *Gui) handleMouseDrag() error {
|
func (gui *Gui) handleMouseDrag() error {
|
||||||
return gui.withLBLActiveCheck(func(state *LblPanelState) error {
|
return gui.withLBLActiveCheck(func(state *LblPanelState) error {
|
||||||
if gui.popupPanelFocused() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
state.SelectLine(gui.Views.Main.SelectedLineIdx())
|
state.SelectLine(gui.Views.Main.SelectedLineIdx())
|
||||||
|
|
||||||
return gui.refreshAndFocusLblPanel(state)
|
return gui.refreshAndFocusLblPanel(state)
|
||||||
|
|||||||
@@ -30,10 +30,6 @@ func (gui *Gui) handleCheckForUpdate() error {
|
|||||||
|
|
||||||
func (gui *Gui) handleStatusClick() error {
|
func (gui *Gui) handleStatusClick() error {
|
||||||
// TODO: move into some abstraction (status is currently not a listViewContext where a lot of this code lives)
|
// TODO: move into some abstraction (status is currently not a listViewContext where a lot of this code lives)
|
||||||
if gui.popupPanelFocused() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
currentBranch := gui.getCheckedOutBranch()
|
currentBranch := gui.getCheckedOutBranch()
|
||||||
if currentBranch == nil {
|
if currentBranch == nil {
|
||||||
// need to wait for branches to refresh
|
// need to wait for branches to refresh
|
||||||
@@ -79,10 +75,6 @@ func formatWorkingTreeState(rebaseMode enums.RebaseMode) string {
|
|||||||
|
|
||||||
func (gui *Gui) statusRenderToMain() error {
|
func (gui *Gui) statusRenderToMain() error {
|
||||||
// TODO: move into some abstraction (status is currently not a listViewContext where a lot of this code lives)
|
// TODO: move into some abstraction (status is currently not a listViewContext where a lot of this code lives)
|
||||||
if gui.popupPanelFocused() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
dashboardString := strings.Join(
|
dashboardString := strings.Join(
|
||||||
[]string{
|
[]string{
|
||||||
lazygitTitle(),
|
lazygitTitle(),
|
||||||
|
|||||||
Reference in New Issue
Block a user