Merge pull request +12242 from c9/fix-copy

Fix copy from immediate window
pull/258/head
Harutyun Amirjanyan 2016-02-19 13:22:46 +04:00
commit b86dc024d0
2 zmienionych plików z 10 dodań i 8 usunięć

Wyświetl plik

@ -56,7 +56,7 @@
"c9"
],
"c9plugins": {
"c9.ide.language": "#050c0de5a4",
"c9.ide.language": "#4c02a26baf",
"c9.ide.language.css": "#be07d72209",
"c9.ide.language.generic": "#a4023db7f6",
"c9.ide.language.html": "#22fdc74869",
@ -89,7 +89,7 @@
"c9.ide.format": "#5ec97fb083",
"c9.ide.help.support": "#af5c4055b2",
"c9.ide.imgeditor": "#612e75ef4f",
"c9.ide.immediate": "#a962119bec",
"c9.ide.immediate": "#19758abe08",
"c9.ide.installer": "#0fde9f0067",
"c9.ide.language.python": "#675ddb4c8f",
"c9.ide.language.go": "#8f6d0beae7",

Wyświetl plik

@ -2058,8 +2058,8 @@ define(function(require, exports, module) {
else {
tab.classList.remove("dark");
html.style.boxShadow = skin.indexOf("flat") == -1
"0 1px 0 0 rgba(255, 255, 255, .3) inset"
"";
? "0 1px 0 0 rgba(255, 255, 255, .3) inset"
: "";
}
html.style.backgroundColor = theme.bg;
@ -2104,7 +2104,7 @@ define(function(require, exports, module) {
value = false;
// Own Implementations
switch(name) {
switch (name) {
case "theme":
ace.setTheme(value);
return;
@ -2537,13 +2537,16 @@ define(function(require, exports, module) {
var data = ace.getCopyText();
ace.onCut();
e.clipboardData.setData("text/plain", data);
data && e.clipboardData.setData("text/plain", data);
});
plugin.on("copy", function(e) {
if (e.native) return; // Ace handles this herself
var data = ace.getCopyText();
e.clipboardData.setData("text/plain", data);
// check if user tries to copy text from line widget
if (!data && document.activeElement != ace.textInput.getElement())
data = document.getSelection().toString().replace(/\xa0/, " ");
data && e.clipboardData.setData("text/plain", data);
});
plugin.on("paste", function(e) {
if (e.native) return; // Ace handles this herself
@ -2685,7 +2688,6 @@ define(function(require, exports, module) {
else {
return handle.theme;
}
return theme;
},
_events: [