Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit b39b7cb

Browse files
authored
Merge branch 'master' into refactor/sync-submodules-vs-command
2 parents 502bb7b + aeb4ec8 commit b39b7cb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/GitHub.App/Services/PullRequestEditorService.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,17 @@ await pullRequestService.ExtractToTempFile(
187187

188188
var diffViewer = GetDiffViewer(frame);
189189

190+
if (diffViewer.LeftView.TextBuffer.CurrentSnapshot.GetText() == string.Empty)
191+
{
192+
// Don't show LeftView when empty.
193+
diffViewer.ViewMode = DifferenceViewMode.RightViewOnly;
194+
}
195+
else if (diffViewer.RightView.TextBuffer.CurrentSnapshot.GetText() == string.Empty)
196+
{
197+
// Don't show RightView when empty.
198+
diffViewer.ViewMode = DifferenceViewMode.LeftViewOnly;
199+
}
200+
190201
AddBufferTag(diffViewer.LeftView.TextBuffer, session, leftPath, mergeBase, DiffSide.Left);
191202

192203
if (!workingDirectory)

0 commit comments

Comments
 (0)