mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #2221: fix wrong detection of table alias and following dot, with text after the current cursor position
This commit is contained in:
@ -6872,10 +6872,9 @@ begin
|
||||
// Find token1.token2.token3, while cursor is somewhere in token3
|
||||
Ident := '[^\s,\(\)=\.]';
|
||||
rx.Expression := '(('+Ident+'+)\.)?('+Ident+'+)\.('+Ident+'*)$';
|
||||
if FProposalTriggeredByDot then
|
||||
LeftPart := Copy(Editor.LineText+'.', 1, Editor.CaretX)
|
||||
else
|
||||
LeftPart := Copy(Editor.LineText, 1, Editor.CaretX-1);
|
||||
LeftPart := Copy(Editor.LineText, 1, Editor.CaretX-1);
|
||||
if FProposalTriggeredByDot then // LineText does not yet contain pressed dot key, see SynMemoQueryProcessCommand
|
||||
LeftPart := LeftPart + '.';
|
||||
FProposalTriggeredByDot := False;
|
||||
if rx.Exec(LeftPart) then begin
|
||||
Token1 := Conn.DeQuoteIdent(rx.Match[2]);
|
||||
|
Reference in New Issue
Block a user