1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-04 03:48:07 +02:00

allow editing or opening a file while resolving merge conflicts

This commit is contained in:
Jesse Duffield 2019-11-12 21:24:01 +11:00
parent 30aed94aa8
commit 7995d56a85
3 changed files with 23 additions and 8 deletions

View File

@ -66,6 +66,8 @@ func (gui *Gui) handleFileSelect(g *gocui.Gui, v *gocui.View, alreadySelected bo
}
if file.HasInlineMergeConflicts {
gui.getMainView().Title = gui.Tr.SLocalize("MergeConflictsTitle")
gui.State.SplitMainPanel = false
return gui.refreshMergePanel()
}

View File

@ -906,16 +906,14 @@ func (gui *Gui) GetContextMap() map[string][]*Binding {
Handler: gui.handleSelectPrevConflict,
Description: gui.Tr.SLocalize("PrevConflict"),
}, {
ViewName: "main",
Key: gocui.KeyArrowRight,
Modifier: gocui.ModNone,
Handler: gui.handleSelectNextConflict,
ViewName: "main",
Key: gocui.KeyArrowRight,
Modifier: gocui.ModNone,
Handler: gui.handleSelectNextConflict,
Description: gui.Tr.SLocalize("NextConflict"),
}, {
ViewName: "main",
Key: gocui.KeyArrowUp,
ViewName: "main",
Key: gocui.KeyArrowUp,
Modifier: gocui.ModNone,
Handler: gui.handleSelectTop,
Description: gui.Tr.SLocalize("SelectTop"),
@ -961,6 +959,18 @@ func (gui *Gui) GetContextMap() map[string][]*Binding {
Modifier: gocui.ModNone,
Handler: gui.handlePopFileSnapshot,
Description: gui.Tr.SLocalize("Undo"),
}, {
ViewName: "main",
Key: 'e',
Modifier: gocui.ModNone,
Handler: gui.handleFileEdit,
Description: gui.Tr.SLocalize("editFile"),
}, {
ViewName: "main",
Key: 'o',
Modifier: gocui.ModNone,
Handler: gui.handleFileOpen,
Description: gui.Tr.SLocalize("openFile"),
},
},
}

View File

@ -147,6 +147,9 @@ func addEnglish(i18nObject *i18n.Bundle) error {
}, &i18n.Message{
ID: "resolveMergeConflicts",
Other: "resolve merge conflicts",
}, &i18n.Message{
ID: "MergeConflictsTitle",
Other: "Merge Conflicts",
}, &i18n.Message{
ID: "checkout",
Other: "checkout",