mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-25 12:24:47 +02:00
do not refresh patch panel unless commit files panel is the current side panel
This commit is contained in:
parent
12ca922a41
commit
fbab5bd444
@ -94,8 +94,10 @@ func (gui *Gui) handleDiscardOldFileChange() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) refreshCommitFilesView() error {
|
func (gui *Gui) refreshCommitFilesView() error {
|
||||||
if err := gui.handleRefreshPatchBuildingPanel(-1); err != nil {
|
if gui.currentSideContext().GetKey() == COMMIT_FILES_CONTEXT_KEY {
|
||||||
return err
|
if err := gui.handleRefreshPatchBuildingPanel(-1); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
to := gui.State.Panels.CommitFiles.refName
|
to := gui.State.Panels.CommitFiles.refName
|
||||||
|
@ -780,18 +780,6 @@ func (gui *Gui) rerenderView(view *gocui.View) error {
|
|||||||
return context.HandleRender()
|
return context.HandleRender()
|
||||||
}
|
}
|
||||||
|
|
||||||
// currently unused
|
|
||||||
// func (gui *Gui) getCurrentSideView() *gocui.View {
|
|
||||||
// currentSideContext := gui.currentSideContext()
|
|
||||||
// if currentSideContext == nil {
|
|
||||||
// return nil
|
|
||||||
// }
|
|
||||||
|
|
||||||
// view, _ := gui.g.View(currentSideContext.GetViewName())
|
|
||||||
|
|
||||||
// return view
|
|
||||||
// }
|
|
||||||
|
|
||||||
func (gui *Gui) getSideContextSelectedItemId() string {
|
func (gui *Gui) getSideContextSelectedItemId() string {
|
||||||
currentSideContext := gui.currentSideListContext()
|
currentSideContext := gui.currentSideListContext()
|
||||||
if currentSideContext == nil {
|
if currentSideContext == nil {
|
||||||
@ -806,3 +794,24 @@ func (gui *Gui) getSideContextSelectedItemId() string {
|
|||||||
|
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// currently unused
|
||||||
|
// func (gui *Gui) getCurrentSideView() *gocui.View {
|
||||||
|
// currentSideContext := gui.currentSideContext()
|
||||||
|
// if currentSideContext == nil {
|
||||||
|
// return nil
|
||||||
|
// }
|
||||||
|
|
||||||
|
// view, _ := gui.g.View(currentSideContext.GetViewName())
|
||||||
|
|
||||||
|
// return view
|
||||||
|
// }
|
||||||
|
|
||||||
|
// currently unused
|
||||||
|
// func (gui *Gui) renderContextStack() string {
|
||||||
|
// result := ""
|
||||||
|
// for _, context := range gui.State.ContextManager.ContextStack {
|
||||||
|
// result += context.GetViewName() + "\n"
|
||||||
|
// }
|
||||||
|
// return result
|
||||||
|
// }
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
@ -382,3 +383,9 @@ func SafeWithError(f func() error) error {
|
|||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func StackTrace() string {
|
||||||
|
buf := make([]byte, 10000)
|
||||||
|
n := runtime.Stack(buf, false)
|
||||||
|
return fmt.Sprintf("%s\n", buf[:n])
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user