delete the editor session when closing a tab

This commit is contained in:
Chris Wanstrath
2011-09-08 00:41:41 -07:00
parent c3dc1cc3eb
commit 7ea2efaf06
2 changed files with 9 additions and 5 deletions

View File

@@ -102,6 +102,10 @@ class Editor extends Pane
@filename = path
@ace.setSession @sessions[path]
deleteSession: (path) ->
@filename = null if path is @filename
delete @sessions[path]
newSession: (code) ->
doc = new EditSession code or ''
doc.setUndoManager new UndoManager