Merge remote-tracking branch 'remotes/origin/gh-pages' into master
This commit is contained in:
commit
e5714c9dba
7 changed files with 61 additions and 8 deletions
|
|
@ -243,7 +243,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="sideToggler">
|
<div class="sideToggler">
|
||||||
<div id="ellipsis_Document.getAllLines" class="ellipsis_description"><p>Returns all lines in the document as string array. Warning: The caller should not modify this array!</p>
|
<div id="ellipsis_Document.getAllLines" class="ellipsis_description"><p>Returns all lines in the document as string array.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description"><p>Returns all lines in the document as string array. Warning: The caller should not modify this array!</p>
|
<div class="description"><p>Returns all lines in the document as string array. Warning: The caller should not modify this array!</p>
|
||||||
|
|
|
||||||
2
build
2
build
|
|
@ -1 +1 @@
|
||||||
Subproject commit cf536740d866276b65cfd351610001c2a841e751
|
Subproject commit 995de31e6513ddfd5e9f66b8216f5b316fcd2253
|
||||||
|
|
@ -177,6 +177,26 @@ env.editor.commands.addCommands([{
|
||||||
editor.showKeyboardShortcuts()
|
editor.showKeyboardShortcuts()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
name: "increaseFontSize",
|
||||||
|
bindKey: "Ctrl-+",
|
||||||
|
exec: function(editor) {
|
||||||
|
var size = parseInt(editor.getFontSize(), 10) || 12;
|
||||||
|
editor.setFontSize(size + 1);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
name: "decreaseFontSize",
|
||||||
|
bindKey: "Ctrl+-",
|
||||||
|
exec: function(editor) {
|
||||||
|
var size = parseInt(editor.getFontSize(), 10) || 12;
|
||||||
|
editor.setFontSize(Math.max(size - 1 || 1));
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
name: "resetFontSize",
|
||||||
|
bindKey: "Ctrl+0",
|
||||||
|
exec: function(editor) {
|
||||||
|
editor.setFontSize(12);
|
||||||
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -199,7 +219,31 @@ var commands = env.editor.commands;
|
||||||
commands.addCommand({
|
commands.addCommand({
|
||||||
name: "save",
|
name: "save",
|
||||||
bindKey: {win: "Ctrl-S", mac: "Command-S"},
|
bindKey: {win: "Ctrl-S", mac: "Command-S"},
|
||||||
exec: function() {alert("Fake Save File");}
|
exec: function(arg) {
|
||||||
|
var session = env.editor.session;
|
||||||
|
name = session.name.match(/[^\/]+$/)
|
||||||
|
localStorage.setItem(
|
||||||
|
"saved_file:" + name,
|
||||||
|
session.getValue()
|
||||||
|
);
|
||||||
|
env.editor.cmdLine.setValue("saved "+ name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
commands.addCommand({
|
||||||
|
name: "load",
|
||||||
|
bindKey: {win: "Ctrl-O", mac: "Command-O"},
|
||||||
|
exec: function(arg) {
|
||||||
|
var session = env.editor.session;
|
||||||
|
name = session.name.match(/[^\/]+$/)
|
||||||
|
var value = localStorage.getItem("saved_file:" + name);
|
||||||
|
if (typeof value == "string") {
|
||||||
|
session.setValue(value);
|
||||||
|
env.editor.cmdLine.setValue("loaded "+ name);
|
||||||
|
} else {
|
||||||
|
env.editor.cmdLine.setValue("no previuos value saved for "+ name);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var keybindings = {
|
var keybindings = {
|
||||||
|
|
@ -247,6 +291,7 @@ var showGutterEl = document.getElementById("show_gutter");
|
||||||
var showPrintMarginEl = document.getElementById("show_print_margin");
|
var showPrintMarginEl = document.getElementById("show_print_margin");
|
||||||
var highlightSelectedWordE = document.getElementById("highlight_selected_word");
|
var highlightSelectedWordE = document.getElementById("highlight_selected_word");
|
||||||
var showHScrollEl = document.getElementById("show_hscroll");
|
var showHScrollEl = document.getElementById("show_hscroll");
|
||||||
|
var showVScrollEl = document.getElementById("show_vscroll");
|
||||||
var animateScrollEl = document.getElementById("animate_scroll");
|
var animateScrollEl = document.getElementById("animate_scroll");
|
||||||
var softTabEl = document.getElementById("soft_tab");
|
var softTabEl = document.getElementById("soft_tab");
|
||||||
var behavioursEl = document.getElementById("enable_behaviours");
|
var behavioursEl = document.getElementById("enable_behaviours");
|
||||||
|
|
@ -409,7 +454,11 @@ bindCheckbox("highlight_selected_word", function(checked) {
|
||||||
});
|
});
|
||||||
|
|
||||||
bindCheckbox("show_hscroll", function(checked) {
|
bindCheckbox("show_hscroll", function(checked) {
|
||||||
env.editor.renderer.setHScrollBarAlwaysVisible(checked);
|
env.editor.setOption("hScrollBarAlwaysVisible", checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
bindCheckbox("show_vscroll", function(checked) {
|
||||||
|
env.editor.setOption("vScrollBarAlwaysVisible", checked);
|
||||||
});
|
});
|
||||||
|
|
||||||
bindCheckbox("animate_scroll", function(checked) {
|
bindCheckbox("animate_scroll", function(checked) {
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,8 @@
|
||||||
<label for="show_hscroll">Persistent HScroll</label>
|
<label for="show_hscroll">Persistent HScroll</label>
|
||||||
</td><td>
|
</td><td>
|
||||||
<input type="checkbox" name="show_hscroll" id="show_hscroll">
|
<input type="checkbox" name="show_hscroll" id="show_hscroll">
|
||||||
|
<label for="show_hscroll">VScroll</label>
|
||||||
|
<input type="checkbox" name="show_vscroll" id="show_vscroll">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ var Document = function(text) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all the lines in the document as a single string, split by the new line character.
|
* Returns all the lines in the document as a single string, joined by the new line character.
|
||||||
**/
|
**/
|
||||||
this.getValue = function() {
|
this.getValue = function() {
|
||||||
return this.getAllLines().join(this.getNewLineCharacter());
|
return this.getAllLines().join(this.getNewLineCharacter());
|
||||||
|
|
@ -191,7 +191,7 @@ var Document = function(text) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all lines in the document as string array. Warning: The caller should not modify this array!
|
* Returns all lines in the document as string array.
|
||||||
**/
|
**/
|
||||||
this.getAllLines = function() {
|
this.getAllLines = function() {
|
||||||
return this.getLines(0, this.getLength());
|
return this.getLines(0, this.getLength());
|
||||||
|
|
|
||||||
|
|
@ -2370,6 +2370,7 @@ config.defineOptions(Editor.prototype, "editor", {
|
||||||
wrapBehavioursEnabled: {initialValue: true},
|
wrapBehavioursEnabled: {initialValue: true},
|
||||||
|
|
||||||
hScrollBarAlwaysVisible: "renderer",
|
hScrollBarAlwaysVisible: "renderer",
|
||||||
|
vScrollBarAlwaysVisible: "renderer",
|
||||||
highlightGutterLine: "renderer",
|
highlightGutterLine: "renderer",
|
||||||
animatedScroll: "renderer",
|
animatedScroll: "renderer",
|
||||||
showInvisibles: "renderer",
|
showInvisibles: "renderer",
|
||||||
|
|
|
||||||
|
|
@ -738,9 +738,10 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$changes |= changes;
|
this.$changes |= changes;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.$size.width)
|
if (!this.$size.width) {
|
||||||
|
this.$changes |= changes;
|
||||||
return this.onResize(true);
|
return this.onResize(true);
|
||||||
|
}
|
||||||
// this.$logChanges(changes);
|
// this.$logChanges(changes);
|
||||||
|
|
||||||
this._signal("beforeRender");
|
this._signal("beforeRender");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue