diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go index b7744788f..35533b00c 100644 --- a/pkg/gui/controllers/local_commits_controller.go +++ b/pkg/gui/controllers/local_commits_controller.go @@ -1448,6 +1448,10 @@ func (self *LocalCommitsController) midRebaseMoveCommandEnabled(selectedCommits func (self *LocalCommitsController) canDropCommits(selectedCommits []*models.Commit, startIdx int, endIdx int) *types.DisabledReason { if !self.isRebasing() { + if len(selectedCommits) > 1 && lo.SomeBy(selectedCommits, func(c *models.Commit) bool { return c.IsMerge() }) { + return &types.DisabledReason{Text: self.c.Tr.DroppingMergeRequiresSingleSelection} + } + return nil } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 2813a1a5f..a822f4215 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -322,6 +322,7 @@ type TranslationSet struct { YouDied string RewordNotSupported string ChangingThisActionIsNotAllowed string + DroppingMergeRequiresSingleSelection string CherryPickCopy string CherryPickCopyTooltip string CherryPickCopyRangeTooltip string @@ -1324,6 +1325,7 @@ func EnglishTranslationSet() *TranslationSet { YouDied: "YOU DIED!", RewordNotSupported: "Rewording commits while interactively rebasing is not currently supported", ChangingThisActionIsNotAllowed: "Changing this kind of rebase todo entry is not allowed", + DroppingMergeRequiresSingleSelection: "Dropping a merge commit requires a single selected item", CherryPickCopy: "Copy (cherry-pick)", CherryPickCopyTooltip: "Mark commit as copied. Then, within the local commits view, you can press `{{.paste}}` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `{{.escape}}` to cancel the selection.", CherryPickCopyRangeTooltip: "Mark commits as copied from the last copied commit to the selected commit.",