mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-02 09:21:40 +02:00
show when building patch
This commit is contained in:
parent
4080e9b501
commit
41df63cdc4
@ -142,21 +142,18 @@ func (gui *Gui) handleInfoClick(g *gocui.Gui, v *gocui.View) error {
|
||||
width, _ := v.Size()
|
||||
|
||||
// if we're in the normal context there will be a donate button here
|
||||
// if we have ('reset') at the end then
|
||||
if gui.inFilterMode() {
|
||||
if width-cx <= len(gui.Tr.SLocalize("(reset)")) {
|
||||
if width-cx <= len(gui.Tr.SLocalize("(reset)")) {
|
||||
if gui.inFilterMode() {
|
||||
return gui.exitFilterMode()
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
if gui.inDiffMode() {
|
||||
if width-cx <= len(gui.Tr.SLocalize("(reset)")) {
|
||||
if gui.inDiffMode() {
|
||||
return gui.exitDiffMode()
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
if gui.GitCommand.PatchManager.Active() {
|
||||
return gui.handleResetPatch()
|
||||
}
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
if cx <= len(gui.Tr.SLocalize("Donate"))+len(INFO_SECTION_PADDING) {
|
||||
|
@ -17,6 +17,8 @@ func (gui *Gui) informationStr() string {
|
||||
return utils.ColoredString(fmt.Sprintf("%s %s %s", gui.Tr.SLocalize("showingGitDiff"), "git diff "+gui.diffStr(), utils.ColoredString(gui.Tr.SLocalize("(reset)"), color.Underline)), color.FgMagenta)
|
||||
} else if gui.inFilterMode() {
|
||||
return utils.ColoredString(fmt.Sprintf("%s '%s' %s", gui.Tr.SLocalize("filteringBy"), gui.State.FilterPath, utils.ColoredString(gui.Tr.SLocalize("(reset)"), color.Underline)), color.FgRed, color.Bold)
|
||||
} else if gui.GitCommand.PatchManager.Active() {
|
||||
return utils.ColoredString(fmt.Sprintf("%s %s", gui.Tr.SLocalize("buildingPatch"), utils.ColoredString(gui.Tr.SLocalize("(reset)"), color.Underline)), color.FgYellow, color.Bold)
|
||||
} else if len(gui.State.CherryPickedCommits) > 0 {
|
||||
return utils.ColoredString(fmt.Sprintf("%d commits copied", len(gui.State.CherryPickedCommits)), color.FgCyan)
|
||||
} else if gui.g.Mouse {
|
||||
|
@ -1170,6 +1170,9 @@ func addEnglish(i18nObject *i18n.Bundle) error {
|
||||
}, &i18n.Message{
|
||||
ID: "viewStashFiles",
|
||||
Other: "view stash entry's files",
|
||||
}, &i18n.Message{
|
||||
ID: "buildingPatch",
|
||||
Other: "building patch",
|
||||
},
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user