mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 10:02:10 +08:00
Also stop at comma and parenthesis in detection of previous token. Fixes issue #1242
This commit is contained in:
@ -6375,7 +6375,7 @@ object MainForm: TMainForm
|
|||||||
Options = [scoLimitToMatchedText, scoUseInsertList, scoUsePrettyText, scoUseBuiltInTimer, scoEndCharCompletion, scoCompleteWithTab, scoCompleteWithEnter]
|
Options = [scoLimitToMatchedText, scoUseInsertList, scoUsePrettyText, scoUseBuiltInTimer, scoEndCharCompletion, scoCompleteWithTab, scoCompleteWithEnter]
|
||||||
NbLinesInWindow = 12
|
NbLinesInWindow = 12
|
||||||
Width = 350
|
Width = 350
|
||||||
EndOfTokenChr = '()[]. ='#9
|
EndOfTokenChr = ',()[]. ='#9
|
||||||
TriggerChars = '.'
|
TriggerChars = '.'
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -6407,7 +6407,7 @@ object MainForm: TMainForm
|
|||||||
OnCodeCompletion = SynCompletionProposal1CodeCompletion
|
OnCodeCompletion = SynCompletionProposal1CodeCompletion
|
||||||
Left = 40
|
Left = 40
|
||||||
Top = 304
|
Top = 304
|
||||||
EndOfTokenChrW = '()[]. ='#9
|
EndOfTokenChrW = ',()[]. ='#9
|
||||||
TriggerCharsW = '.'
|
TriggerCharsW = '.'
|
||||||
end
|
end
|
||||||
object OpenDialogSQLFile: TOpenDialog
|
object OpenDialogSQLFile: TOpenDialog
|
||||||
|
@ -4521,8 +4521,8 @@ begin
|
|||||||
|
|
||||||
rx := TRegExpr.Create;
|
rx := TRegExpr.Create;
|
||||||
|
|
||||||
// Find longer token, ignore EndOfTokenChars, just the last chars up to a whitespace
|
// Find longer token, ignore EndOfTokenChars, just the last chars up to a whitespace, comma or paranthesis
|
||||||
rx.Expression := '(\S+).$';
|
rx.Expression := '([^\s,\(\)]+).$';
|
||||||
PrevLongToken := Copy(Editor.LineText, 0, x);
|
PrevLongToken := Copy(Editor.LineText, 0, x);
|
||||||
if rx.Exec(PrevLongToken) then
|
if rx.Exec(PrevLongToken) then
|
||||||
PrevLongToken := rx.Match[1]
|
PrevLongToken := rx.Match[1]
|
||||||
|
Reference in New Issue
Block a user