Rename TextBuffer::load to TextBuffer::loadSync

This commit is contained in:
probablycorey 2013-10-15 10:39:50 -07:00
parent af8ecef30d
commit 57d9aa6019
2 changed files with 4 additions and 4 deletions

View File

@ -250,7 +250,7 @@ class Project
# Private: DEPRECATED
buildBufferSync: (absoluteFilePath, initialText) ->
buffer = new TextBuffer({project: this, filePath: absoluteFilePath, initialText})
buffer.load()
buffer.loadSync()
@addBuffer(buffer)
buffer
@ -262,7 +262,7 @@ class Project
# Returns a promise that resolves to the {TextBuffer}.
buildBuffer: (absoluteFilePath, initialText) ->
buffer = new TextBuffer({project: this, filePath: absoluteFilePath, initialText})
buffer.loadAsync().then (buffer) =>
buffer.load().then (buffer) =>
@addBuffer(buffer)
buffer

View File

@ -66,12 +66,12 @@ class TextBuffer
@setPath(@project.resolve(filePath)) if @project
load: ->
loadSync: ->
@updateCachedDiskContents()
@reload() if @loadFromDisk and @isModified()
@text.clearUndoStack()
loadAsync: ->
load: ->
@updateCachedDiskContentsAsync().then =>
@reload() if @loadFromDisk and @isModified()
@text.clearUndoStack()