window title = last path segment

This commit is contained in:
Chris Wanstrath
2011-11-06 20:40:57 -08:00
parent f09e97fe0d
commit 5e19f70cbc

View File

@@ -6,6 +6,7 @@ Native = require 'native'
Storage = require 'storage'
fs = require 'fs'
_ = require 'underscore'
# This a weirdo file. We don't create a Window class, we just add stuff to
# the DOM window.
@@ -20,7 +21,7 @@ windowAdditions =
KeyBinder.register "window", window
@path = atomController.path
@setTitle @path
@setTitle _.last @path.split '/'
@editor = if fs.isFile @path
new Editor @path