mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Oh no, we can't set the title in the constructor because window hasn't been required yet!
This commit is contained in:
@@ -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: ->
|
||||
|
||||
Reference in New Issue
Block a user