mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-28 17:13:45 +03:00
Rename TextBuffer::load to TextBuffer::loadSync
This commit is contained in:
parent
af8ecef30d
commit
57d9aa6019
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user