Skip to content

Commit 61b0813

Browse files
committed
fixes #165 diff with active opens blank document
1 parent 07c277c commit 61b0813

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.6.1 - 2019-09-27
2+
* Fixed "Diff with Active File" opens blank document #165
3+
14
## 1.6.0 - 2019-01-24
25
* Added ability to disable automatic diff #139
36
* Changed loading indicator to appear in footer UI instead of as a modal that covered both editors #149

lib/split-diff.coffee

+2-4
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,8 @@ module.exports = SplitDiff =
425425
editor2.getBuffer().setLanguageMode(atom.grammars.languageModeForGrammarAndBuffer(editor1.getGrammar(), editor2.getBuffer()))
426426
return {editor1: editor1, editor2: editor2}
427427
else if editorWithoutPath
428-
editor2 = atom.workspace.buildTextEditor({autoHeight: false})
429-
rightPane.addItem(editor2)
430-
431-
return Promise.resolve({editor1: editor1, editor2: editor2})
428+
rightPane.addItem(editorWithoutPath)
429+
return Promise.resolve({editor1: editor1, editor2: editorWithoutPath})
432430
else
433431
noActiveEditorMsg = 'No active file found! (Try focusing a text editor)'
434432
atom.notifications.addWarning('Split Diff', {detail: noActiveEditorMsg, dismissable: false, icon: 'diff'})

package-lock.json

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)