mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Saving a buffer sets its modified flag to false
This commit is contained in:
@@ -161,9 +161,10 @@ class Buffer
|
||||
@undoManager.redo()
|
||||
|
||||
save: ->
|
||||
if not @getPath() then throw new Error("Tried to save buffer with no file path")
|
||||
if not @getPath() then throw new Error("Can't save buffer with no file path")
|
||||
@trigger 'before-save'
|
||||
fs.write @getPath(), @getText()
|
||||
@modified = false
|
||||
@trigger 'after-save'
|
||||
|
||||
saveAs: (path) ->
|
||||
|
||||
Reference in New Issue
Block a user