浏览代码

HUE-3579 [editor] Pasting a big query should not increase editor size by more than 50% of the page

Enrico Berti 10 年之前
父节点
当前提交
0923862342
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -1398,7 +1398,7 @@
 
       ace().on('change', function () {
         if (autoExpand) {
-          var maxAutoLines = Math.floor(($(window).height() - 200) / 16);
+          var maxAutoLines = Math.floor((($(window).height() - 80) / 2) / 16);
           if (ace().session.getLength() > editorHeight) {
             if (ace().session.getLength() < maxAutoLines) {
               $target.height((ace().session.getLength() + 1) * 16);