We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00cd789 commit f35783cCopy full SHA for f35783c
lib/grammar-utils.js
@@ -73,12 +73,9 @@ const GrammarUtils = {
73
74
/** get workingDirectory */
75
workingDirectory() {
76
- const activePane = atom.workspace.getActivePaneItem()
77
- if (activePane && activePane.buffer && activePane.buffer.file && activePane.buffer.file.getParent) {
78
- const parent = activePane.buffer.file.getParent()
79
- if (parent && parent.getPath) {
80
- return parent.getPath()
81
- }
+ const textEditor = atom.workspace.getActiveTextEditor()
+ if (textEditor !== undefined) {
+ return textEditor.getDirectoryPath()
82
}
83
return process.cwd()
84
},
0 commit comments