diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css index 8ebc1616..0063ba2d 100644 --- a/lib/ace/css/editor.css +++ b/lib/ace/css/editor.css @@ -71,8 +71,8 @@ .ace_scrollbar { position: absolute; - overflow-x: hidden; - overflow-y: scroll; + overflow: hidden; + overflow-y: auto; right: 0; top: 0; bottom: 0; @@ -84,6 +84,22 @@ left: 0; } +.ace_scrollbar-h { + position: absolute; + overflow-x: auto; + overflow-y: hidden; + right: 0; + left: 0; + bottom: 0; +} + +.ace_scrollbar-inner { + position: absolute; + height: 1px; + left: 0; +} + + .ace_print-margin { position: absolute; height: 100%; diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js index 4f9ace1f..90b727ef 100644 --- a/lib/ace/edit_session.js +++ b/lib/ace/edit_session.js @@ -985,7 +985,7 @@ var EditSession = function(text, mode) { * **/ this.setScrollTop = function(scrollTop) { - scrollTop = Math.round(Math.max(0, scrollTop)); + scrollTop = Math.round(scrollTop); if (this.$scrollTop === scrollTop || isNaN(scrollTop)) return; @@ -1006,7 +1006,7 @@ var EditSession = function(text, mode) { * [Sets the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.setScrollLeft} **/ this.setScrollLeft = function(scrollLeft) { - scrollLeft = Math.round(Math.max(0, scrollLeft)); + scrollLeft = Math.round(scrollLeft); if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft)) return; diff --git a/lib/ace/ext/textarea.js b/lib/ace/ext/textarea.js index a402e65f..fee9b9b2 100644 --- a/lib/ace/ext/textarea.js +++ b/lib/ace/ext/textarea.js @@ -288,21 +288,18 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) { settingDiv.hideButton.focus(); editor.on("focus", function onFocus() { editor.removeListener("focus", onFocus); - settingDiv.style.display = "none" + settingDiv.style.display = "none"; }); } else { editor.focus(); - }; + } }; + editor.$setOption = editor.setOption; editor.setOption = function(key, value) { if (options[key] == value) return; switch (key) { - case "gutter": - renderer.setShowGutter(toBool(value)); - break; - case "mode": if (value != "text") { // Load the required mode file. Files get loaded only once. @@ -366,18 +363,9 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) { break; } break; - - case "useSoftTabs": - session.setUseSoftTabs(toBool(value)); - break; - - case "showPrintMargin": - renderer.setShowPrintMargin(toBool(value)); - break; - - case "showInvisibles": - editor.setShowInvisibles(toBool(value)); - break; + + default: + editor.$setOption(key, toBool(value)); } options[key] = value; @@ -391,9 +379,7 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) { return options; }; - for (var option in exports.options) { - editor.setOption(option, exports.options[option]); - } + editor.setOptions(exports.options); return editor; } @@ -493,7 +479,7 @@ function setupSettingPanel(settingDiv, settingOpener, editor, options) { cValue == "true" ? "checked='true'" : "", "'>" ); - return + return; } builder.push("