From faf6e3ec083f99868efa6d0fefbe817b465157a4 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 5 Oct 2015 23:20:03 +0400 Subject: [PATCH] add :wa and :sort vim commands --- package.json | 2 +- plugins/c9.ide.ace/ace.js | 4 ++-- plugins/c9.ide.keys/commands.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 54edaa8c..c55b0333 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "c9.automate": "#47e2c429c9", "c9.ide.ace.emmet": "#6dc4585e02", "c9.ide.ace.gotoline": "#a8ff07c8f4", - "c9.ide.ace.keymaps": "#bf6d36213f", + "c9.ide.ace.keymaps": "#2e3c6e3c8f", "c9.ide.ace.repl": "#7989bbd07f", "c9.ide.ace.split": "#0ae0151c78", "c9.ide.ace.statusbar": "#d95be89d53", diff --git a/plugins/c9.ide.ace/ace.js b/plugins/c9.ide.ace/ace.js index 5a1747ae..27275599 100644 --- a/plugins/c9.ide.ace/ace.js +++ b/plugins/c9.ide.ace/ace.js @@ -618,8 +618,8 @@ define(function(require, exports, module) { return isAvailable ? isAvailable(editor.ace) : true; }; - command.findEditor = function(editor) { - if (apf.activeElement && apf.activeElement.ace && apf.activeElement.ace.isFocused()) + command.findEditor = function(editor, e) { + if (e && apf.activeElement && apf.activeElement.ace && apf.activeElement.ace.isFocused()) return apf.activeElement.ace; return editor && editor.ace || editor; }; diff --git a/plugins/c9.ide.keys/commands.js b/plugins/c9.ide.keys/commands.js index 90f73771..b95d6d6c 100644 --- a/plugins/c9.ide.keys/commands.js +++ b/plugins/c9.ide.keys/commands.js @@ -127,10 +127,10 @@ define(function(require, exports, module) { } if (command.isAvailable && !command.isAvailable(editor, args, e)) - return; //Disable commands for other contexts + return; // Disable commands for other contexts if (command.findEditor) - editor = command.findEditor(editor); + editor = command.findEditor(editor, e); if (editor && editor.$readOnly && !command.readOnly) return false;