mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
delete the editor session when closing a tab
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user