add `currentFile`

pull/3094/head
yann300 6 years ago
parent 0cd0dd6ea2
commit b74ef28c8e
  1. 5
      src/app/files/fileManager.js
  2. 2
      src/app/plugin/pluginAPI.js

@ -79,6 +79,11 @@ class FileManager {
return null return null
} }
currentFile () {
var self = this
return self._deps.config.get('currentFile')
}
currentPath () { currentPath () {
var self = this var self = this
var currentFile = self._deps.config.get('currentFile') var currentFile = self._deps.config.get('currentFile')

@ -67,7 +67,7 @@ module.exports = (pluginManager, fileProviders, fileManager, compiler, udapp) =>
}, },
editor: { editor: {
getCurrentFile: (mod, cb) => { getCurrentFile: (mod, cb) => {
var path = fileManager.currentPath() var path = fileManager.currentFile()
if (!path) { if (!path) {
cb('no file selected') cb('no file selected')
} else { } else {

Loading…
Cancel
Save