From 446e3e1bf9fa5346100324b1e870329493bda1ef Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 31 May 2015 16:48:35 +0400 Subject: [PATCH] fix #2522 Popup position is off when gutter isn't shown --- demo/kitchen-sink/dev_util.js | 2 +- lib/ace/autocomplete.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/kitchen-sink/dev_util.js b/demo/kitchen-sink/dev_util.js index 8dab857c..f466285d 100644 --- a/demo/kitchen-sink/dev_util.js +++ b/demo/kitchen-sink/dev_util.js @@ -39,7 +39,7 @@ function warn() { s.shift(); // remove the getter s = s.join("\n"); // allow easy access to ace in console, but not in ace code - if (!/at Object.InjectedScript.|@debugger eval|snippets:\/{3}/.test(s)) { + if (!/at Object.InjectedScript.|@debugger eval|snippets:\/{3}|\(:\d+:\d+\)/.test(s)) { console.error("trying to access to global variable"); } } diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js index d3b41b65..caef17ca 100644 --- a/lib/ace/autocomplete.js +++ b/lib/ace/autocomplete.js @@ -100,7 +100,7 @@ var Autocomplete = function() { var rect = editor.container.getBoundingClientRect(); pos.top += rect.top - renderer.layerConfig.offset; pos.left += rect.left - editor.renderer.scrollLeft; - pos.left += renderer.$gutterLayer.gutterWidth; + pos.left += renderer.gutterWidth; this.popup.show(pos, lineHeight); } else if (keepPopupPosition && !prefix) {