mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
set window title with filename
This commit is contained in:
@@ -16,6 +16,7 @@ saveAs = ->
|
||||
return null
|
||||
if file = panel.filenames.lastObject
|
||||
filename = file
|
||||
App.window.title = _.last filename.split('/')
|
||||
save()
|
||||
|
||||
canon = require 'pilot/canon'
|
||||
@@ -37,6 +38,7 @@ bindKey 'open', 'Command-O', (env, args, request) ->
|
||||
|
||||
if file = panel.filenames.lastObject
|
||||
filename = file
|
||||
App.window.title = _.last filename.split('/')
|
||||
code = OSX.NSString.stringWithContentsOfFile file
|
||||
env.editor.getSession().setValue code
|
||||
|
||||
@@ -53,4 +55,4 @@ bindKey 'togglecomment', 'Command-/', (env) ->
|
||||
env.editor.toggleCommentLines()
|
||||
|
||||
bindKey 'fullscreen', 'Command-Return', (env) ->
|
||||
OSX.NSLog 'coming soon'
|
||||
OSX.NSLog 'coming soon'
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
}
|
||||
if (file = panel.filenames.lastObject) {
|
||||
filename = file;
|
||||
App.window.title = _.last(filename.split('/'));
|
||||
return save();
|
||||
}
|
||||
};
|
||||
@@ -42,6 +43,7 @@
|
||||
}
|
||||
if (file = panel.filenames.lastObject) {
|
||||
filename = file;
|
||||
App.window.title = _.last(filename.split('/'));
|
||||
code = OSX.NSString.stringWithContentsOfFile(file);
|
||||
return env.editor.getSession().setValue(code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user