mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
remove dead code
This commit is contained in:
parent
675510ba53
commit
d59c0e2725
2 changed files with 0 additions and 27 deletions
|
@ -1,27 +1,10 @@
|
|||
package gui
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
||||
"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?
|
||||
func (gui *Gui) onCommitFileFocus() error {
|
||||
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 {
|
||||
return gui.State.ViewContextMap.Get(view.Name()).HandleRender()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue