mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow users to enable wrapping of code in SQL boxes. Fixes#2025
This commit is contained in:
committed by
Dave Page
parent
1d571902da
commit
6fc8f040ff
@@ -146,6 +146,12 @@ class SqlEditorModule(PgAdminModule):
|
||||
help_str=gettext('Specifies whether or not to insert spaces instead of tabs when the tab key is used.')
|
||||
)
|
||||
|
||||
self.wrap_code = self.preference.register(
|
||||
'Options', 'wrap_code',
|
||||
gettext("Line wrapping?"), 'boolean', False,
|
||||
category_label=gettext('Options'),
|
||||
help_str=gettext('Specifies whether or not to wrap SQL code in editor.')
|
||||
)
|
||||
|
||||
blueprint = SqlEditorModule(MODULE_NAME, __name__, static_url_path='/static')
|
||||
|
||||
|
||||
@@ -190,7 +190,8 @@ define(
|
||||
},
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
|
||||
extraKeys: pgBrowser.editor_shortcut_keys,
|
||||
tabSize: pgAdmin.Browser.editor_options.tabSize
|
||||
tabSize: pgAdmin.Browser.editor_options.tabSize,
|
||||
lineWrapping: pgAdmin.Browser.editor_options.wrapCode
|
||||
});
|
||||
|
||||
// Create main wcDocker instance
|
||||
@@ -234,6 +235,7 @@ define(
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
|
||||
extraKeys: pgBrowser.editor_shortcut_keys,
|
||||
tabSize: pgAdmin.Browser.editor_options.tabSize,
|
||||
lineWrapping: pgAdmin.Browser.editor_options.wrapCode,
|
||||
scrollbarStyle: 'simple'
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user