mirror of
https://github.com/atom/atom.git
synced 2026-02-13 16:14:59 -05:00
Add option to make temporary file backups when saving
This commit is contained in:
@@ -621,14 +621,14 @@ class TextEditor extends Model
|
||||
# Essential: Saves the editor's text buffer.
|
||||
#
|
||||
# See {TextBuffer::save} for more details.
|
||||
save: -> @buffer.save()
|
||||
save: -> @buffer.save(backup: atom.config.get('editor.backUpBeforeSaving'))
|
||||
|
||||
# Public: Saves the editor's text buffer as the given path.
|
||||
#
|
||||
# See {TextBuffer::saveAs} for more details.
|
||||
#
|
||||
# * `filePath` A {String} path.
|
||||
saveAs: (filePath) -> @buffer.saveAs(filePath)
|
||||
saveAs: (filePath) -> @buffer.saveAs(filePath, backup: atom.config.get('editor.backUpBeforeSaving'))
|
||||
|
||||
# Determine whether the user should be prompted to save before closing
|
||||
# this editor.
|
||||
|
||||
Reference in New Issue
Block a user