mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
remove dead code
This commit is contained in:
@ -1,27 +1,10 @@
|
|||||||
package gui
|
package gui
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/controllers"
|
"github.com/jesseduffield/lazygit/pkg/gui/controllers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (gui *Gui) getSelectedCommitFile() *models.CommitFile {
|
|
||||||
node := gui.State.Contexts.CommitFiles.GetSelectedFileNode()
|
|
||||||
if node == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return node.File
|
|
||||||
}
|
|
||||||
|
|
||||||
func (gui *Gui) getSelectedCommitFilePath() string {
|
|
||||||
node := gui.State.Contexts.CommitFiles.GetSelectedFileNode()
|
|
||||||
if node == nil {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return node.GetPath()
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: do we need this?
|
// TODO: do we need this?
|
||||||
func (gui *Gui) onCommitFileFocus() error {
|
func (gui *Gui) onCommitFileFocus() error {
|
||||||
gui.escapeLineByLinePanel()
|
gui.escapeLineByLinePanel()
|
||||||
|
@ -448,16 +448,6 @@ func (gui *Gui) setViewTabForContext(c types.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) contextForContextKey(contextKey types.ContextKey) (types.Context, bool) {
|
|
||||||
for _, context := range gui.State.Contexts.Flatten() {
|
|
||||||
if context.GetKey() == contextKey {
|
|
||||||
return context, true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil, false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (gui *Gui) rerenderView(view *gocui.View) error {
|
func (gui *Gui) rerenderView(view *gocui.View) error {
|
||||||
return gui.State.ViewContextMap.Get(view.Name()).HandleRender()
|
return gui.State.ViewContextMap.Get(view.Name()).HandleRender()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user