diff --git a/plugins/git4idea/src/git4idea/merge/GitMergeDialog.kt b/plugins/git4idea/src/git4idea/merge/GitMergeDialog.kt index 7cbdcf8f272f..596a082725bf 100644 --- a/plugins/git4idea/src/git4idea/merge/GitMergeDialog.kt +++ b/plugins/git4idea/src/git4idea/merge/GitMergeDialog.kt @@ -359,8 +359,11 @@ class GitMergeDialog(private val project: Project, } private fun updateCommitMessagePanel() { - commitMsgPanel.isVisible = MergeOption.COMMIT_MESSAGE in selectedOptions - commitMsgField.text = "" + val useCommitMsg = MergeOption.COMMIT_MESSAGE in selectedOptions + commitMsgPanel.isVisible = useCommitMsg + if (!useCommitMsg) { + commitMsgField.text = "" + } } private fun createOptionButton(option: MergeOption) = OptionButton(option, option.option) { optionChosen(option) }