fix(pr): TextBuffer is no longer an EventEmitter

This commit is contained in:
Dan Kaplun 2015-11-06 16:38:10 -05:00
parent 19b2a2ac83
commit 2b6b531cc7
2 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ BaseFindForm.prototype._initHandlers = function () {
}
});
textBuf.on('changed', function () { self.find(textBuf.getText()); });
textBuf.onDidChange(function () { self.find(textBuf.getText()); });
self.findField.on('keypress', function (ch, key) {
var text = textBuf.getText();
switch (self.resolveBinding(key)) {

View File

@ -127,8 +127,8 @@ Pane.prototype._initHandlers = function () {
self.on('close', function () { self.screen.slap.header.message(null); });
editor.on('insertMode', function () { self.screen.slap.header.render(); });
['path-changed', 'changed'].forEach(function (evt) {
editor.textBuf.on(evt, function () { self.screen.slap.header.render(); });
['onDidChange', 'onDidChangePath'].forEach(function (prop) {
editor.textBuf[prop](function () { self.screen.slap.header.render(); });
});
return BaseWidget.prototype._initHandlers.apply(self, arguments);