mirror of
https://github.com/atom/atom.git
synced 2026-02-07 13:14:55 -05:00
Handle save-as on pane. Replace 'editor:save-as' w/ 'core:save-as'
Pane will only show the saveAs dialog if the item has a `saveAs` method.
This commit is contained in:
committed by
probablycorey
parent
59a06acc0b
commit
3f9ee08e76
@@ -152,7 +152,6 @@ class Editor extends View
|
||||
'core:select-down': @selectDown
|
||||
'core:select-to-top': @selectToTop
|
||||
'core:select-to-bottom': @selectToBottom
|
||||
'editor:save-as': @saveAs
|
||||
'editor:newline-below': @insertNewlineBelow
|
||||
'editor:newline-above': @insertNewlineAbove
|
||||
'editor:toggle-soft-tabs': @toggleSoftTabs
|
||||
@@ -610,12 +609,6 @@ class Editor extends View
|
||||
@removeClass 'soft-wrap'
|
||||
$(window).off 'resize', @_setSoftWrapColumn
|
||||
|
||||
saveAs: (session=@activeEditSession, onSuccess) ->
|
||||
atom.showSaveDialog (path) =>
|
||||
if path
|
||||
session.saveAs(path)
|
||||
onSuccess?()
|
||||
|
||||
autosave: ->
|
||||
@save() if @getPath()?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user