commit
695e24c418
4 changed files with 16 additions and 13 deletions
|
|
@ -502,7 +502,7 @@ function exportAce(ns, modules, requireBase, extModules) {
|
|||
if (typeof modules == "string")
|
||||
modules = [modules];
|
||||
|
||||
return (text + ";" + template
|
||||
return (text.replace(/;\s*$/, "") + ";" + template
|
||||
.toString()
|
||||
.replace(/MODULES/g, JSON.stringify(modules))
|
||||
.replace(/REQUIRE_NS/g, requireBase)
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ var Autocomplete = function() {
|
|||
e.stop();
|
||||
}.bind(this));
|
||||
this.popup.focus = this.editor.focus.bind(this.editor);
|
||||
this.popup.on("show", this.tooltipTimer.bind(null, null));
|
||||
this.popup.on("select", this.tooltipTimer.bind(null, null));
|
||||
this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null));
|
||||
return this.popup;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ oop.inherits(JsonWorker, Mirror);
|
|||
var value = this.doc.getValue();
|
||||
|
||||
try {
|
||||
var result = parse(value);
|
||||
if (value)
|
||||
parse(value);
|
||||
} catch (e) {
|
||||
var pos = this.doc.indexToPosition(e.at-1);
|
||||
this.sender.emit("error", {
|
||||
|
|
|
|||
|
|
@ -958,23 +958,24 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.scrollBarH.setVisible(horizScroll);
|
||||
}
|
||||
|
||||
if (!this.$maxLines && this.$scrollPastEnd) {
|
||||
maxHeight += (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd;
|
||||
}
|
||||
|
||||
var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
|
||||
size.scrollerHeight - maxHeight < 0);
|
||||
var vScrollChanged = this.$vScroll !== vScroll;
|
||||
if (vScrollChanged) {
|
||||
this.$vScroll = vScroll;
|
||||
this.scrollBarV.setVisible(vScroll);
|
||||
}
|
||||
var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd
|
||||
? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
|
||||
: 0;
|
||||
maxHeight += scrollPastEnd;
|
||||
|
||||
this.session.setScrollTop(Math.max(-this.scrollMargin.top,
|
||||
Math.min(this.scrollTop, maxHeight - size.scrollerHeight + this.scrollMargin.bottom)));
|
||||
|
||||
this.session.setScrollLeft(Math.max(-this.scrollMargin.left, Math.min(this.scrollLeft,
|
||||
longestLine + 2 * this.$padding - size.scrollerWidth + this.scrollMargin.right)));
|
||||
|
||||
var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
|
||||
size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop);
|
||||
var vScrollChanged = this.$vScroll !== vScroll;
|
||||
if (vScrollChanged) {
|
||||
this.$vScroll = vScroll;
|
||||
this.scrollBarV.setVisible(vScroll);
|
||||
}
|
||||
|
||||
var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
|
||||
var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue