From 6f27db96050c30489f7307cf2477947ed3f8de06 Mon Sep 17 00:00:00 2001 From: Ian Olsen Date: Tue, 17 Jan 2017 17:45:29 -0800 Subject: [PATCH] Manually close editors for files deleted from tree view --- lib/tree-view.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/tree-view.coffee b/lib/tree-view.coffee index a7421527..50c85e81 100644 --- a/lib/tree-view.coffee +++ b/lib/tree-view.coffee @@ -568,7 +568,11 @@ class TreeView extends View "Move to Trash": => failedDeletions = [] for selectedPath in selectedPaths - if not shell.moveItemToTrash(selectedPath) + if shell.moveItemToTrash(selectedPath) + for editor in atom.workspace.getTextEditors() + if editor?.getPath() is selectedPath + editor.destroy() + else failedDeletions.push "#{selectedPath}" if repo = repoForPath(selectedPath) repo.getPathStatus(selectedPath)