Browse Source

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

Enrico Berti 9 years ago
parent
commit
0923862342
1 changed files with 1 additions and 1 deletions
  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);