mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
📝 Add API docs for onDidChangeActiveTextEditor(callback)
This commit is contained in:
@@ -660,6 +660,14 @@ module.exports = class Workspace extends Model {
|
||||
return this.emitter.on('did-stop-changing-active-pane-item', callback)
|
||||
}
|
||||
|
||||
// Essential: Invoke the given callback when a text editor becomes the active
|
||||
// text editor and when there is no longer an active text editor.
|
||||
//
|
||||
// * `callback` {Function} to be called when the active text editor changes.
|
||||
// * `editor` The active {TextEditor} or undefined if there is no longer an
|
||||
// active text editor.
|
||||
//
|
||||
// Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.
|
||||
onDidChangeActiveTextEditor (callback) {
|
||||
return this.emitter.on('did-change-active-text-editor', callback)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user