Handle buffer cleared
This commit is contained in:
parent
7effd0d216
commit
d64930662a
|
@ -35,6 +35,13 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', 'notific
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const handleBufferCleared = function(message) {
|
||||||
|
var bufferMessage = message.objects[0].content[0];
|
||||||
|
var bufferId = bufferMessage.pointers[0];
|
||||||
|
let buffer = models.getBuffer(bufferId);
|
||||||
|
$log.debug('Handle buffer cleared: ' + buffer.fullName);
|
||||||
|
buffer.clear();
|
||||||
|
};
|
||||||
|
|
||||||
var handleBufferClosing = function(message) {
|
var handleBufferClosing = function(message) {
|
||||||
var bufferMessage = message.objects[0].content[0];
|
var bufferMessage = message.objects[0].content[0];
|
||||||
|
@ -500,6 +507,7 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', 'notific
|
||||||
};
|
};
|
||||||
|
|
||||||
var eventHandlers = {
|
var eventHandlers = {
|
||||||
|
_buffer_cleared: handleBufferCleared,
|
||||||
_buffer_closing: handleBufferClosing,
|
_buffer_closing: handleBufferClosing,
|
||||||
_buffer_line_added: handleBufferLineAdded,
|
_buffer_line_added: handleBufferLineAdded,
|
||||||
_buffer_localvar_added: handleBufferLocalvarChanged,
|
_buffer_localvar_added: handleBufferLocalvarChanged,
|
||||||
|
@ -541,4 +549,4 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', 'notific
|
||||||
handleCompletion: handleCompletion
|
handleCompletion: handleCompletion
|
||||||
};
|
};
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
|
Loading…
Reference in New Issue