Fix move to first/last character in line if in wrap mode. Fixes some other bugs on the way and add some simple unit tests.

This commit is contained in:
Julian Viereck 2011-01-11 15:47:55 +01:00
commit 28ea247f17
8 changed files with 171 additions and 51 deletions

View file

@ -91,6 +91,7 @@ exports.launch = function(env) {
var container = document.getElementById("editor");
env.editor = new Editor(new Renderer(container, theme));
window.$editor = env.editor;
function onDocChange() {
var doc = getDoc();
@ -124,7 +125,7 @@ exports.launch = function(env) {
docEl.onchange = onDocChange;
function getDoc() {
return docs[docEl.value];
return docs.plain//docs[docEl.value];
}
var modeEl = document.getElementById("mode");