Fixed an issue where AutoComplete was not working correctly due to incorrect regex. #5473

This commit is contained in:
Akshay Joshi
2022-11-07 13:59:18 +05:30
parent 6bc5808c53
commit 398675597a
2 changed files with 3 additions and 1 deletions

View File

@@ -468,7 +468,7 @@ export default function CodeMirror({currEditor, name, value, options, events, re
let pref = pgWindow?.pgAdmin?.Browser?.get_preferences_for_module('sqleditor') || {};
if (autocomplete && pref.autocomplete_on_key_press) {
editor.current.on('keyup', (cm, event)=>{
if (!cm.state.completionActive && (event.key == 'Backspace' || /^[ -~]{1}$'/.test(event.key))) {
if (!cm.state.completionActive && (event.key == 'Backspace' || /^[ -~]{1}$/.test(event.key))) {
OrigCodeMirror.commands.autocomplete(cm, null, {completeSingle: false});
}
});