From 953fb31e14774df86fb3e57d967d506ba69cd6ce Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Fri, 9 Dec 2022 14:13:40 +0530 Subject: [PATCH] Fixed an issue with auto-complete not working as expected with double quotes. #5551 --- docs/en_US/release_notes_6_18.rst | 1 + .../tools/sqleditor/static/js/components/sections/Query.jsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_6_18.rst b/docs/en_US/release_notes_6_18.rst index a378bdab3..32456e519 100644 --- a/docs/en_US/release_notes_6_18.rst +++ b/docs/en_US/release_notes_6_18.rst @@ -27,6 +27,7 @@ Bug fixes | `Issue #5453 `_ - Fixed an issue where Transaction IDs were not found in session in the Query Tool. | `Issue #5470 `_ - Fixed an issue where tablespace was missing on partition tables in SQL. + | `Issue #5551 `_ - Fixed an issue with auto-complete not working as expected with double quotes. | `Issue #5564 `_ - Ensure that table statistics are sorted by size. | `Issue #5603 `_ - Fixed an issue where master password was not set correctly with external config database. | `Issue #5606 `_ - Fixed an error in the collation create script for PG-15. diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/Query.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/Query.jsx index f0bc04ed3..d355f2bda 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/Query.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/Query.jsx @@ -154,7 +154,7 @@ function registerAutocomplete(api, transId, sqlEditorPref, onFailure) { token.string = token.string.slice(0, cur.ch - token.start); } - if (token.string.match(/^[.`\w@]\w*$/)) { + if (token.string.match(/^[."`\w@]\w*$/)) { search = token.string; start = token.start; end = token.end; @@ -179,7 +179,7 @@ function registerAutocomplete(api, transId, sqlEditorPref, onFailure) { self_local.editor.state.autoCompleteList = []; // Clear the auto complete list if previous token/search is blank or dot. - if (prevSearch == '' || prevSearch == '.') + if (prevSearch == '' || prevSearch == '.' || prevSearch == '"') self_local.editor.state.autoCompleteList = []; prevSearch = search;