kopia lustrzana https://github.com/c9/core
Disable link clicking by holding shift ctrl or meta
rodzic
6b5b16559b
commit
96ef199e6c
|
@ -378,6 +378,9 @@ var HoverLink = function(editor) {
|
|||
};
|
||||
|
||||
this.onMouseMove = function(e) {
|
||||
if (e.shiftKey || e.ctrlKey || e.metaKey)
|
||||
return this.clear();
|
||||
|
||||
if (this.editor.$mouseHandler.isMousePressed) {
|
||||
if (!this.editor.selection.isEmpty())
|
||||
this.clear();
|
||||
|
|
|
@ -38,11 +38,11 @@ define(function(require, exports, module) {
|
|||
|
||||
terminal.on("create", function(e) {
|
||||
var ace = e.editor.ace;
|
||||
if (!ace)
|
||||
return;
|
||||
if (!ace) return;
|
||||
|
||||
ace.hoverLink = new HoverLink(ace);
|
||||
ace.hoverLink.on("open", showMenu);
|
||||
});
|
||||
}, plugin);
|
||||
|
||||
function createMenu(e) {
|
||||
if (menu)
|
||||
|
@ -71,9 +71,6 @@ define(function(require, exports, module) {
|
|||
? "Unable to access via preview"
|
||||
: BASEPATH + info.path });
|
||||
}
|
||||
// else if (e.value == "github") {
|
||||
|
||||
// }
|
||||
}
|
||||
}, plugin);
|
||||
|
||||
|
@ -92,7 +89,6 @@ define(function(require, exports, module) {
|
|||
new MenuItem({ caption: "Copy Special", submenu: submenu }),
|
||||
new Divider(),
|
||||
new MenuItem({ value: "reveal", caption: "Reveal in File Tree" })
|
||||
// new MenuItem({ caption: "Open in GitHub" }),
|
||||
];
|
||||
|
||||
menu = new Menu({
|
||||
|
@ -168,7 +164,8 @@ define(function(require, exports, module) {
|
|||
window.open(href);
|
||||
else
|
||||
commands.exec("preview", null, { path: href });
|
||||
} else if (e.type == "path") {
|
||||
}
|
||||
else if (e.type == "path") {
|
||||
var info = buildPath(e);
|
||||
var path = info.path;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue