mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-04 13:06:51 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3de12b7fde | ||
|
|
c35e3776dd | ||
|
|
b4a38a368a | ||
|
|
26096d9dd9 |
@@ -267,7 +267,7 @@ func (self *WorkingTreeCommands) WorktreeFileDiffCmdObj(node models.IFile, plain
|
||||
noIndex := !node.GetIsTracked() && !node.GetHasStagedChanges() && !cached && node.GetIsFile()
|
||||
extDiffCmd := self.UserConfig().Git.Paging.ExternalDiffCommand
|
||||
useExtDiff := extDiffCmd != "" && !plain
|
||||
useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig
|
||||
useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig && !plain
|
||||
|
||||
cmdArgs := NewGitCmd("diff").
|
||||
ConfigIf(useExtDiff, "diff.external="+extDiffCmd).
|
||||
@@ -305,7 +305,7 @@ func (self *WorkingTreeCommands) ShowFileDiffCmdObj(from string, to string, reve
|
||||
|
||||
extDiffCmd := self.UserConfig().Git.Paging.ExternalDiffCommand
|
||||
useExtDiff := extDiffCmd != "" && !plain
|
||||
useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig
|
||||
useExtDiffGitConfig := self.UserConfig().Git.Paging.UseExternalDiffGitConfig && !plain
|
||||
|
||||
cmdArgs := NewGitCmd("diff").
|
||||
Config("diff.noprefix=false").
|
||||
|
||||
@@ -51,6 +51,7 @@ func (self *OptionsMenuAction) Call() error {
|
||||
HideCancel: true,
|
||||
ColumnAlignment: []utils.Alignment{utils.AlignRight, utils.AlignLeft},
|
||||
AllowFilteringKeybindings: true,
|
||||
KeepConfirmKeybindings: true,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ func (gui *Gui) createMenu(opts types.CreateMenuOptions) error {
|
||||
maxColumnSize = max(maxColumnSize, len(item.LabelColumns))
|
||||
|
||||
// Remove all item keybindings that are the same as the confirm binding
|
||||
if item.Key == confirmKey {
|
||||
if item.Key == confirmKey && !opts.KeepConfirmKeybindings {
|
||||
item.Key = nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,6 +156,7 @@ type CreateMenuOptions struct {
|
||||
HideCancel bool
|
||||
ColumnAlignment []utils.Alignment
|
||||
AllowFilteringKeybindings bool
|
||||
KeepConfirmKeybindings bool // if true, the keybindings that match the confirm binding will not be removed from menu items
|
||||
}
|
||||
|
||||
type CreatePopupPanelOpts struct {
|
||||
|
||||
Reference in New Issue
Block a user