Switch to ACE editor
This commit is contained in:
parent
6b718d407c
commit
a45529b530
@ -1,5 +1,5 @@
|
|||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
#Date Sun Sep 15 2013 18:10:41
|
#Date Sun Sep 15 2013 18:45:16
|
||||||
|
|
||||||
CACHE:
|
CACHE:
|
||||||
index.html
|
index.html
|
||||||
|
@ -12894,7 +12894,7 @@ define("config", function() {}), define("storage", [ "underscore", "utils" ], fu
|
|||||||
}));
|
}));
|
||||||
var s = l.config.shortcutPrevious.toLowerCase();
|
var s = l.config.shortcutPrevious.toLowerCase();
|
||||||
r.bind(s, function() {
|
r.bind(s, function() {
|
||||||
console.log("keydown"), void 0 === v && (i.dropdown("toggle"), v = p[m.fileIndex]);
|
void 0 === v && (i.dropdown("toggle"), v = p[m.fileIndex]);
|
||||||
var e = t.indexOf(f, v) - 1;
|
var e = t.indexOf(f, v) - 1;
|
||||||
return -2 === e && (e = -1), v = f[(e + f.length) % f.length], t.defer(function() {
|
return -2 === e && (e = -1), v = f[(e + f.length) % f.length], t.defer(function() {
|
||||||
v.find("a").focus();
|
v.find("a").focus();
|
||||||
@ -12902,7 +12902,7 @@ define("config", function() {}), define("storage", [ "underscore", "utils" ], fu
|
|||||||
});
|
});
|
||||||
var a = l.config.shortcutNext.toLowerCase();
|
var a = l.config.shortcutNext.toLowerCase();
|
||||||
r.bind(l.config.shortcutNext.toLowerCase(), function() {
|
r.bind(l.config.shortcutNext.toLowerCase(), function() {
|
||||||
console.log("keydown"), void 0 === v && (i.dropdown("toggle"), v = p[m.fileIndex]);
|
void 0 === v && (i.dropdown("toggle"), v = p[m.fileIndex]);
|
||||||
var e = t.indexOf(f, v) + 1;
|
var e = t.indexOf(f, v) + 1;
|
||||||
return v = f[e % f.length], t.defer(function() {
|
return v = f[e % f.length], t.defer(function() {
|
||||||
v.find("a").focus();
|
v.find("a").focus();
|
||||||
@ -12910,7 +12910,7 @@ define("config", function() {}), define("storage", [ "underscore", "utils" ], fu
|
|||||||
});
|
});
|
||||||
var c = s.indexOf("+"), u = -1 === c ? s : s.substring(0, c), d = a.indexOf("+"), y = -1 === d ? a : a.substring(0, d);
|
var c = s.indexOf("+"), u = -1 === c ? s : s.substring(0, c), d = a.indexOf("+"), y = -1 === d ? a : a.substring(0, d);
|
||||||
r.bind([ u, y ], function() {
|
r.bind([ u, y ], function() {
|
||||||
console.log("keyup"), void 0 !== v && v.find("a").click();
|
void 0 !== v && v.find("a").click();
|
||||||
}, "keyup");
|
}, "keyup");
|
||||||
}, l;
|
}, l;
|
||||||
}), define("classes/FolderDescriptor", [ "underscore", "utils", "fileSystem" ], function(e, t, n) {
|
}), define("classes/FolderDescriptor", [ "underscore", "utils", "fileSystem" ], function(e, t, n) {
|
||||||
@ -23134,8 +23134,8 @@ if (hljs.LANGUAGES.glsl = function(e) {
|
|||||||
}, 100);
|
}, 100);
|
||||||
I.session.on("changeScrollTop", function() {
|
I.session.on("changeScrollTop", function() {
|
||||||
void 0 !== j && u();
|
void 0 !== j && u();
|
||||||
}), I.session.selection.on("changeSelection", function() {
|
}), I.session.selection.on("changeCursor", function() {
|
||||||
void 0 !== j && (z.editorSelectRange = I.getSelectionRange());
|
void 0 !== j && (console.log("changeCursor"), z.editorSelectRange = I.getSelectionRange());
|
||||||
}), c.scroll(function() {
|
}), c.scroll(function() {
|
||||||
void 0 !== j && (z.previewScrollTop = c.scrollTop());
|
void 0 !== j && (z.previewScrollTop = c.scrollTop());
|
||||||
});
|
});
|
||||||
|
@ -207,7 +207,6 @@ define([
|
|||||||
}
|
}
|
||||||
aceEditor = ace.edit("wmd-input");
|
aceEditor = ace.edit("wmd-input");
|
||||||
aceEditor.renderer.setShowGutter(false);
|
aceEditor.renderer.setShowGutter(false);
|
||||||
//aceEditor.renderer.setShowPrintMargin(false);
|
|
||||||
aceEditor.renderer.setPrintMarginColumn(false);
|
aceEditor.renderer.setPrintMarginColumn(false);
|
||||||
aceEditor.renderer.setPadding(EDITOR_DEFAULT_PADDING);
|
aceEditor.renderer.setPadding(EDITOR_DEFAULT_PADDING);
|
||||||
aceEditor.session.setUseWrapMode(true);
|
aceEditor.session.setUseWrapMode(true);
|
||||||
@ -421,8 +420,9 @@ define([
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Store editor selection on change
|
// Store editor selection on change
|
||||||
aceEditor.session.selection.on('changeSelection', function() {
|
aceEditor.session.selection.on('changeCursor', function() {
|
||||||
if(documentContent !== undefined) {
|
if(documentContent !== undefined) {
|
||||||
|
console.log('changeCursor');
|
||||||
fileDesc.editorSelectRange = aceEditor.getSelectionRange();
|
fileDesc.editorSelectRange = aceEditor.getSelectionRange();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -130,7 +130,6 @@ define([
|
|||||||
// Handle key shortcut
|
// Handle key shortcut
|
||||||
var shortcutPrevious = documentSelector.config.shortcutPrevious.toLowerCase();
|
var shortcutPrevious = documentSelector.config.shortcutPrevious.toLowerCase();
|
||||||
mousetrap.bind(shortcutPrevious, function() {
|
mousetrap.bind(shortcutPrevious, function() {
|
||||||
console.log('keydown')
|
|
||||||
if(selectedLi === undefined) {
|
if(selectedLi === undefined) {
|
||||||
$dropdownElt.dropdown('toggle');
|
$dropdownElt.dropdown('toggle');
|
||||||
selectedLi = liEltMap[selectFileDesc.fileIndex];
|
selectedLi = liEltMap[selectFileDesc.fileIndex];
|
||||||
@ -147,7 +146,6 @@ define([
|
|||||||
});
|
});
|
||||||
var shortcutNext = documentSelector.config.shortcutNext.toLowerCase();
|
var shortcutNext = documentSelector.config.shortcutNext.toLowerCase();
|
||||||
mousetrap.bind(documentSelector.config.shortcutNext.toLowerCase(), function() {
|
mousetrap.bind(documentSelector.config.shortcutNext.toLowerCase(), function() {
|
||||||
console.log('keydown')
|
|
||||||
if(selectedLi === undefined) {
|
if(selectedLi === undefined) {
|
||||||
$dropdownElt.dropdown('toggle');
|
$dropdownElt.dropdown('toggle');
|
||||||
selectedLi = liEltMap[selectFileDesc.fileIndex];
|
selectedLi = liEltMap[selectFileDesc.fileIndex];
|
||||||
@ -167,7 +165,6 @@ define([
|
|||||||
shortcutSelect1,
|
shortcutSelect1,
|
||||||
shortcutSelect2
|
shortcutSelect2
|
||||||
], function() {
|
], function() {
|
||||||
console.log('keyup')
|
|
||||||
if(selectedLi !== undefined) {
|
if(selectedLi !== undefined) {
|
||||||
selectedLi.find("a").click();
|
selectedLi.find("a").click();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user