mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Merge pull request +9730 from c9/vim
add :wa and :sort vim commands
This commit is contained in:
commit
4e8a128175
@ -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",
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user