Hi,

PFA patch to fix the issue where SQL Panel in query tool displays truncated
sql on resize.
RM#2078

Steps to re-produce the issue:
1) Create table provided by user from RM.
2) Right click on newly created table
3) Select 'Script' -> 'CREATE Script'
4) Drag the splitter down side to maximise SQL Panel area.
*** Do not click on SQL area ***
5) You will see truncated sql.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js 
b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index da24f77..ea8fedb 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -176,6 +176,16 @@ define([
             scrollbarStyle: 'simple'
         });
 
+        // Refresh Code mirror on SQL panel resize to
+        // display its value properly
+        sql_panel_obj.on(wcDocker.EVENT.RESIZE_ENDED, function() {
+          setTimeout(function() {
+            if(self && self.query_tool_obj) {
+              self.query_tool_obj.refresh();
+            }
+          }, 200);
+        });
+
         // Create panels for 'Data Output', 'Explain', 'Messages' and 'History'
         var data_output = new pgAdmin.Browser.Panel({
           name: 'data_output',
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to