Skip to content

Commit

Permalink
Fix completion proposal not showing columns of a table alias when tab…
Browse files Browse the repository at this point in the history
…le name contains the word "join". Closes #1923
  • Loading branch information
ansgarbecker committed Mar 17, 2024
1 parent 4751e83 commit f038db4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/main.pas
Expand Up @@ -6890,7 +6890,7 @@ procedure TMainForm.SynCompletionProposalExecute(Kind: SynCompletionType;
if rx.Exec(CurrentQuery) then begin
TableClauses := rx.Match[3];
// Ensure tables in JOIN clause(s) are splitted by comma
TableClauses := StringReplace(TableClauses, 'JOIN', ',', [rfReplaceAll, rfIgnoreCase]);
TableClauses := ReplaceRegExpr('\sJOIN\s', TableClauses, ',', [rroModifierI]);
// Remove surrounding parentheses
TableClauses := StringReplace(TableClauses, '(', ' ', [rfReplaceAll]);
TableClauses := StringReplace(TableClauses, ')', ' ', [rfReplaceAll]);
Expand Down

0 comments on commit f038db4

Please sign in to comment.