Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 2fedad3

Browse files
committed
📝 Document the async onWillSave behavior
1 parent 543f84f commit 2fedad3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/text-buffer.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,8 @@ class TextBuffer
482482

483483
# Public: Invoke the given callback before the buffer is saved to disk.
484484
#
485-
# * `callback` {Function} to be called before the buffer is saved.
485+
# * `callback` {Function} to be called before the buffer is saved. If this function returns
486+
# a {Promise}, then the buffer will not be saved until the promise resolves.
486487
#
487488
# Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.
488489
onWillSave: (callback) ->

0 commit comments

Comments
 (0)