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

Manually close editors for files deleted from tree view #1026

Merged
merged 1 commit into from
Jan 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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