mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed tab indent issue on a selection of lines is deleting the content when 'use spaces == true' in the preferences. Fixes #4235
This commit is contained in:
parent
979f806161
commit
c2e875d54b
@ -21,6 +21,7 @@ Bug fixes
|
|||||||
*********
|
*********
|
||||||
|
|
||||||
| `Issue #3851 <https://redmine.postgresql.org/issues/3851>`_ - Add proper indentation to the code while generating functions, procedures, and trigger functions.
|
| `Issue #3851 <https://redmine.postgresql.org/issues/3851>`_ - Add proper indentation to the code while generating functions, procedures, and trigger functions.
|
||||||
|
| `Issue #4235 <https://redmine.postgresql.org/issues/4235>`_ - Fixed tab indent issue on a selection of lines is deleting the content when 'use spaces == true' in the preferences.
|
||||||
| `Issue #5621 <https://redmine.postgresql.org/issues/5621>`_ - Remove extra brackets from reverse engineering SQL of RLS Policy.
|
| `Issue #5621 <https://redmine.postgresql.org/issues/5621>`_ - Remove extra brackets from reverse engineering SQL of RLS Policy.
|
||||||
| `Issue #5630 <https://redmine.postgresql.org/issues/5630>`_ - Fixed an issue where installation of pgadmin4 not working on 32-bit Windows.
|
| `Issue #5630 <https://redmine.postgresql.org/issues/5630>`_ - Fixed an issue where installation of pgadmin4 not working on 32-bit Windows.
|
||||||
| `Issue #5631 <https://redmine.postgresql.org/issues/5631>`_ - Fixed 'cant execute empty query' issue when remove the value of 'USING' or 'WITH CHECK' option of RLS Policy.
|
| `Issue #5631 <https://redmine.postgresql.org/issues/5631>`_ - Fixed 'cant execute empty query' issue when remove the value of 'USING' or 'WITH CHECK' option of RLS Policy.
|
@ -2527,6 +2527,22 @@ define([
|
|||||||
self.sqlCtrl.setOption('lineWrapping', sqlEditPreferences.wrap_code);
|
self.sqlCtrl.setOption('lineWrapping', sqlEditPreferences.wrap_code);
|
||||||
self.sqlCtrl.setOption('autoCloseBrackets', sqlEditPreferences.insert_pair_brackets);
|
self.sqlCtrl.setOption('autoCloseBrackets', sqlEditPreferences.insert_pair_brackets);
|
||||||
self.sqlCtrl.setOption('matchBrackets', sqlEditPreferences.brace_matching);
|
self.sqlCtrl.setOption('matchBrackets', sqlEditPreferences.brace_matching);
|
||||||
|
// Added extra logic to handel tab indent and use space setting.
|
||||||
|
self.sqlCtrl.setOption('extraKeys', {
|
||||||
|
Tab: (cm) => {
|
||||||
|
if(cm.somethingSelected()){
|
||||||
|
cm.execCommand('indentMore');
|
||||||
|
} else {
|
||||||
|
if (!sqlEditPreferences.use_spaces) {
|
||||||
|
cm.replaceSelection('\t', 'end', '+input');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cm.execCommand('insertSoftTab');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'Shift-Tab': (cm) => cm.execCommand('indentLess'),
|
||||||
|
});
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (self.sqlCtrl) self.sqlCtrl.refresh();
|
if (self.sqlCtrl) self.sqlCtrl.refresh();
|
||||||
}, 500);
|
}, 500);
|
||||||
|
@ -224,6 +224,22 @@ function updateUIPreferences(sqlEditor) {
|
|||||||
sqlEditor.query_tool_obj.setOption('lineWrapping', preferences.wrap_code);
|
sqlEditor.query_tool_obj.setOption('lineWrapping', preferences.wrap_code);
|
||||||
sqlEditor.query_tool_obj.setOption('autoCloseBrackets', preferences.insert_pair_brackets);
|
sqlEditor.query_tool_obj.setOption('autoCloseBrackets', preferences.insert_pair_brackets);
|
||||||
sqlEditor.query_tool_obj.setOption('matchBrackets', preferences.brace_matching);
|
sqlEditor.query_tool_obj.setOption('matchBrackets', preferences.brace_matching);
|
||||||
|
// Added extra logic to handel tab indent and use space setting.
|
||||||
|
sqlEditor.query_tool_obj.setOption('extraKeys', {
|
||||||
|
Tab: (cm) => {
|
||||||
|
if(cm.somethingSelected()){
|
||||||
|
cm.execCommand('indentMore');
|
||||||
|
} else {
|
||||||
|
if (!preferences.use_spaces) {
|
||||||
|
cm.replaceSelection('\t', 'end', '+input');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cm.execCommand('insertSoftTab');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'Shift-Tab': (cm) => cm.execCommand('indentLess'),
|
||||||
|
});
|
||||||
sqlEditor.query_tool_obj.refresh();
|
sqlEditor.query_tool_obj.refresh();
|
||||||
|
|
||||||
/* Render history to reflect Font size change */
|
/* Render history to reflect Font size change */
|
||||||
|
@ -200,6 +200,22 @@ function initFilterDialog(alertify, pgBrowser) {
|
|||||||
$(this.filter_obj.getWrapperElement()).css('font-size', sql_font_size);
|
$(this.filter_obj.getWrapperElement()).css('font-size', sql_font_size);
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
// Added extra logic to handel tab indent and use space setting.
|
||||||
|
that.filter_obj.setOption('extraKeys', {
|
||||||
|
Tab: (cm) => {
|
||||||
|
if(cm.somethingSelected()){
|
||||||
|
cm.execCommand('indentMore');
|
||||||
|
} else {
|
||||||
|
if (!that.preferences.use_spaces) {
|
||||||
|
cm.replaceSelection('\t', 'end', '+input');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cm.execCommand('insertSoftTab');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'Shift-Tab': (cm) => cm.execCommand('indentLess'),
|
||||||
|
});
|
||||||
// Set focus on editor
|
// Set focus on editor
|
||||||
that.filter_obj.refresh();
|
that.filter_obj.refresh();
|
||||||
that.filter_obj.focus();
|
that.filter_obj.focus();
|
||||||
|
Loading…
Reference in New Issue
Block a user