diff --git a/source/main.dfm b/source/main.dfm index 37568d88..0fb3d69f 100644 --- a/source/main.dfm +++ b/source/main.dfm @@ -6375,7 +6375,7 @@ object MainForm: TMainForm Options = [scoLimitToMatchedText, scoUseInsertList, scoUsePrettyText, scoUseBuiltInTimer, scoEndCharCompletion, scoCompleteWithTab, scoCompleteWithEnter] NbLinesInWindow = 12 Width = 350 - EndOfTokenChr = '()[]. ='#9 + EndOfTokenChr = ',()[]. ='#9 TriggerChars = '.' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -6407,7 +6407,7 @@ object MainForm: TMainForm OnCodeCompletion = SynCompletionProposal1CodeCompletion Left = 40 Top = 304 - EndOfTokenChrW = '()[]. ='#9 + EndOfTokenChrW = ',()[]. ='#9 TriggerCharsW = '.' end object OpenDialogSQLFile: TOpenDialog diff --git a/source/main.pas b/source/main.pas index 95c3b846..2f7382d9 100644 --- a/source/main.pas +++ b/source/main.pas @@ -4521,8 +4521,8 @@ begin rx := TRegExpr.Create; - // Find longer token, ignore EndOfTokenChars, just the last chars up to a whitespace - rx.Expression := '(\S+).$'; + // Find longer token, ignore EndOfTokenChars, just the last chars up to a whitespace, comma or paranthesis + rx.Expression := '([^\s,\(\)]+).$'; PrevLongToken := Copy(Editor.LineText, 0, x); if rx.Exec(PrevLongToken) then PrevLongToken := rx.Match[1]