in src/main/kotlin/git4ideaClasses/IREditorHandler.kt [84:109]
protected fun handleInteractiveEditor(file: File): Boolean {
val rebaseFile = IRGitRebaseFile(myProject, myRoot, file)
return try {
val entries = rebaseFile.load()
// if (ContainerUtil.findInstance<Action,
// IRGitEntry.Action.Other>(ContainerUtil
// .map<IRGitEntry, Action>(entries, com.intellij.util.Function<IRGitEntry, IRGitEntry.Action>
// { it: IRGitEntry -> it.action }), IRGitEntry.Action.Other::class.java) != null) {
// return handleUnstructuredEditor(file)
// } it used to be this but couldn't make it work
if (entries.map { it.action }.any { it is IRGitEntry.Action.Other }) {
return handleUnstructuredEditor(file)
}
val newEntries = collectNewEntries(entries)
if (newEntries != null) {
rebaseFile.save(newEntries)
true
} else {
rebaseFile.cancel()
false
}
} catch (e: IRGitRebaseFile.NoopException) {
confirmNoopRebase()
}
}