kopia lustrzana https://github.com/c9/core
fix largerfont command
rodzic
c040ccc6ba
commit
87f5a9e214
|
@ -582,7 +582,14 @@ define(function(require, exports, module) {
|
||||||
commands.addCommand(commands.commands.togglerecording, handle);
|
commands.addCommand(commands.commands.togglerecording, handle);
|
||||||
commands.addCommand(commands.commands.replaymacro, handle);
|
commands.addCommand(commands.commands.replaymacro, handle);
|
||||||
|
|
||||||
commands.addCommand(fnWrap({
|
function sharedCommand(command) {
|
||||||
|
command.isAvailable = function(editor) {
|
||||||
|
return editor && editor.type == "ace";
|
||||||
|
};
|
||||||
|
command.group = "Code Editor";
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
commands.addCommand(sharedCommand({
|
||||||
name: "syntax",
|
name: "syntax",
|
||||||
exec: function(_, syntax) {
|
exec: function(_, syntax) {
|
||||||
if (typeof syntax == "object")
|
if (typeof syntax == "object")
|
||||||
|
@ -597,7 +604,7 @@ define(function(require, exports, module) {
|
||||||
commands: modes.caption
|
commands: modes.caption
|
||||||
}), handle);
|
}), handle);
|
||||||
|
|
||||||
commands.addCommand(fnWrap({
|
commands.addCommand(sharedCommand({
|
||||||
name: "largerfont",
|
name: "largerfont",
|
||||||
bindKey: { mac : "Command-+|Command-=", win : "Ctrl-+|Ctrl-=" },
|
bindKey: { mac : "Command-+|Command-=", win : "Ctrl-+|Ctrl-=" },
|
||||||
exec: function(e) {
|
exec: function(e) {
|
||||||
|
@ -606,7 +613,7 @@ define(function(require, exports, module) {
|
||||||
}
|
}
|
||||||
}), handle);
|
}), handle);
|
||||||
|
|
||||||
commands.addCommand(fnWrap({
|
commands.addCommand(sharedCommand({
|
||||||
name: "smallerfont",
|
name: "smallerfont",
|
||||||
bindKey: { mac : "Command--", win : "Ctrl--" },
|
bindKey: { mac : "Command--", win : "Ctrl--" },
|
||||||
exec: function(e) {
|
exec: function(e) {
|
||||||
|
@ -615,16 +622,13 @@ define(function(require, exports, module) {
|
||||||
}
|
}
|
||||||
}), handle);
|
}), handle);
|
||||||
|
|
||||||
commands.addCommand({
|
commands.addCommand(sharedCommand({
|
||||||
name: "toggleWordWrap",
|
name: "toggleWordWrap",
|
||||||
bindKey: {win: "Ctrl-Q", mac: "Ctrl-W"},
|
bindKey: {win: "Ctrl-Q", mac: "Ctrl-W"},
|
||||||
exec: function(editor) {
|
exec: function(editor) {
|
||||||
editor.setOption("wrap", editor.getOption("wrap") == "off");
|
editor.setOption("wrap", editor.getOption("wrap") == "off");
|
||||||
},
|
|
||||||
isAvailable: function(editor) {
|
|
||||||
return editor && editor.type == "ace";
|
|
||||||
}
|
}
|
||||||
}, handle);
|
}), handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Preferences *****/
|
/***** Preferences *****/
|
||||||
|
|
Ładowanie…
Reference in New Issue