fixing emacs key handler when key code == -1 (this can happen with the

change introduced in #5e2c5f4)
This commit is contained in:
Robert Krahn 2014-03-12 04:56:49 -07:00
commit 3b7569542f

View file

@ -219,6 +219,10 @@ exports.handler.bindKey = function(key, command) {
};
exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
// if keyCode == -1 a non-printable key was pressed, such as just
// control. Handling those is currently not supported in this handler
if (keyCode === -1) return undefined;
var editor = data.editor;
// insertstring data.count times
if (hashId == -1) {