in src/main/kotlin/com/jetbrains/interactiveRebase/services/ActionService.kt [181:200]
fun checkFixupOrSquash(e: AnActionEvent) {
val notEmpty = modelService.branchInfo.selectedCommits.isNotEmpty()
val notFirstCommit =
!(
modelService.branchInfo.selectedCommits.size==1 &&
modelService.branchInfo.currentCommits.reversed()
.indexOf(modelService.branchInfo.selectedCommits[0])==0
)
val notDropped =
modelService.getSelectedCommits().none { commit ->
commit.getChangesAfterPick().any { change -> change is DropCommand }
}
val validParent = checkValidParent()
e.presentation.isEnabled = notEmpty &&
notFirstCommit && notDropped &&
validParent && !modelService.areDisabledCommitsSelected() &&
checkRebaseIsNotInProgress()
}