Fixed an issue where pressing backspace should remove the spaces and not the entire tab width, on enabling 'Use spaces?' in the preferences. #7317

This commit is contained in:
Akshay Joshi
2024-04-22 12:33:38 +05:30
parent db23330939
commit 3e0ade5a59
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -36,3 +36,4 @@ Bug fixes
| `Issue #7275 <https://github.com/pgadmin-org/pgadmin4/issues/7275>`_ - Fixed an issue where debugger was not scrolling automatically on stepping.
| `Issue #7282 <https://github.com/pgadmin-org/pgadmin4/issues/7282>`_ - Fixed an XSS vulnerability in the /settings/store endpoint.
| `Issue #7294 <https://github.com/pgadmin-org/pgadmin4/issues/7294>`_ - Fixed an issue where double dollar quoted code is treated as string in syntax highlighter.
| `Issue #7317 <https://github.com/pgadmin-org/pgadmin4/issues/7317>`_ - Fixed an issue where pressing backspace should remove the spaces and not the entire tab width, on enabling 'Use spaces?' in the preferences.
@@ -28,7 +28,7 @@ import {
keymap,
} from '@codemirror/view';
import { EditorState, Compartment } from '@codemirror/state';
import { history, defaultKeymap, historyKeymap, indentLess, indentMore } from '@codemirror/commands';
import { history, defaultKeymap, historyKeymap, indentLess, indentMore, deleteCharBackwardStrict } from '@codemirror/commands';
import { closeBrackets, autocompletion, closeBracketsKeymap, completionKeymap, acceptCompletion } from '@codemirror/autocomplete';
import {
foldGutter,
@@ -118,6 +118,10 @@ const defaultExtensions = [
},{
key: 'Tab',
run: acceptCompletion,
},{
key: 'Backspace',
preventDefault: true,
run: deleteCharBackwardStrict,
}]),
sql({
dialect: PgSQL,