Browse Source

HUE-7415 [editor] The editor textarea should retain its size on new query

Enrico Berti 8 years ago
parent
commit
e735582
1 changed files with 1 additions and 5 deletions
  1. 1 5
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

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

@@ -2047,12 +2047,8 @@
             }
             resized = true;
           }
-          else if (ace().session.getLength() > 8) {
-            $target.height((ace().session.getLength()) * 16);
-            resized = true;
-          }
           else {
-            $target.height(8 * 16);
+            $target.height(Math.max(ace().session.getLength() * 16, $.totalStorage('hue.editor.editor.size') || 131));
             resized = true;
           }
           if (ace().session.getLength() == editorHeight) {