diff --git a/README.md b/README.md index 4a66ca8..aafc590 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ { "key": "ctrl+e", "command": "workbench.action.openRecent" } ``` +## Notice + * We don't list the files outside the workspace. ## How to use * press `cmd` + `e` (`ctrl` + `e` in Windows) * press `F1` then type `Open Recent Files` diff --git a/extension.js b/extension.js index a2b80f6..10028ef 100644 --- a/extension.js +++ b/extension.js @@ -59,7 +59,9 @@ function handleUserInput(item) { } function mapUriToDisplayName() { - return _.chain(list.slice()).uniq().reverse().map((item) => { + return _.chain(list.slice()).uniq().reverse().remove(item => { + return item.split(vscode.workspace.rootPath).length != 1 + }).map((item) => { return item.substring(vscode.workspace.rootPath.length + 1) }).filter((item) => { //ignore the system files which starts with .