Add preferences to enable brace matching and brace closing in the SQL editors. Fixes #2513

This commit is contained in:
Murtuza Zabuawala
2017-06-27 09:57:38 -04:00
committed by Dave Page
parent a87ee6d059
commit 1b49bb8b22
8 changed files with 62 additions and 18 deletions

View File

@@ -4,7 +4,9 @@ define([
'pgadmin.tools.debugger.ui', 'wcdocker', 'pgadmin.backform',
'pgadmin.backgrid', 'codemirror/addon/selection/active-line',
'codemirror/addon/fold/foldgutter', 'codemirror/addon/fold/foldcode',
'pgadmin-sqlfoldcode'
'pgadmin-sqlfoldcode', 'codemirror/addon/edit/matchbrackets',
'codemirror/addon/edit/closebrackets',
], function(
gettext, $, _, S, Alertify, pgAdmin, pgBrowser, Backbone, Backgrid,
CodeMirror, Backform, debug_function_again
@@ -1605,7 +1607,9 @@ define([
readOnly: true,
extraKeys: pgAdmin.Browser.editor_shortcut_keys,
tabSize: pgAdmin.Browser.editor_options.tabSize,
lineWrapping: pgAdmin.Browser.editor_options.wrapCode
lineWrapping: pgAdmin.Browser.editor_options.wrapCode,
autoCloseBrackets: pgAdmin.Browser.editor_options.insert_pair_brackets,
matchBrackets: pgAdmin.Browser.editor_options.brace_matching
});
// On loading the docker, register the callbacks