From 4dc2d2fca110fb252bfb834cfacd6f34b96d4b7b Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 10 Nov 2011 17:22:33 -0800 Subject: [PATCH] Oh no, we can't set the title in the constructor because window hasn't been required yet! --- src/atom/editor.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/atom/editor.coffee b/src/atom/editor.coffee index 57e030e28..20b5bea89 100644 --- a/src/atom/editor.coffee +++ b/src/atom/editor.coffee @@ -76,6 +76,9 @@ class Editor extends Document catch e null + title: -> + if @path then _.last @path.split '/' or 'untitled' + open: (path) -> return false if not super return false if @path @@ -86,6 +89,9 @@ class Editor extends Document @ace.getSession().setUndoManager new UndoManager mode = @modeForPath() @ace.getSession().setMode new mode if mode + + window.setTitle @title() + true close: ->