Skip to content

Commit d573b07

Browse files
committed
Show correct editor name in conflicts dialog
1 parent 2ff53b6 commit d573b07

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

app/src/ui/multi-commit-operation/dialog/conflicts-dialog.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export class ConflictsDialog extends React.Component<
135135
files: ReadonlyArray<WorkingDirectoryFileChange>
136136
) {
137137
let isFirstUnmergedFile = true
138+
const externalEditorName = this.getExternalEditorName()
138139
return (
139140
<ul className="unmerged-file-statuses">
140141
{files.map(f => {
@@ -144,7 +145,7 @@ export class ConflictsDialog extends React.Component<
144145
return renderUnmergedFile({
145146
path: f.path,
146147
status: f.status,
147-
resolvedExternalEditor: this.props.resolvedExternalEditor,
148+
resolvedExternalEditor: externalEditorName,
148149
openFileInExternalEditor: this.props.openFileInExternalEditor,
149150
repository: this.props.repository,
150151
dispatcher: this.props.dispatcher,
@@ -164,6 +165,17 @@ export class ConflictsDialog extends React.Component<
164165
)
165166
}
166167

168+
private getExternalEditorName() {
169+
const { repository, resolvedExternalEditor } = this.props
170+
const repoEditor = repository.customEditorOverride
171+
if (!repoEditor) {
172+
return resolvedExternalEditor
173+
}
174+
return repoEditor.useCustomEditor
175+
? 'External Editor'
176+
: repoEditor.selectedExternalEditor
177+
}
178+
167179
private renderContent(
168180
unmergedFiles: ReadonlyArray<WorkingDirectoryFileChange>,
169181
conflictedFilesCount: number

0 commit comments

Comments
 (0)