Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Manually close editors for files deleted from tree view
Browse files Browse the repository at this point in the history
  • Loading branch information
iolsen committed Jan 20, 2017
1 parent 3c33bb8 commit 6f27db9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/tree-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6f27db9

Please sign in to comment.