mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Fix detection of previous token in query memo's. SynCompletionProposal.OnExecute passes x + y coordinates of current caret position - these are pixel values, while we expected them to be character + line numbers.
This commit is contained in:
@ -4125,8 +4125,8 @@ begin
|
||||
rx := TRegExpr.Create;
|
||||
|
||||
// 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);
|
||||
rx.Expression := '([^\s,\(\)]+)$';
|
||||
PrevLongToken := Copy(Editor.LineText, 1, Editor.CaretX-2);
|
||||
if rx.Exec(PrevLongToken) then
|
||||
PrevLongToken := rx.Match[1]
|
||||
else
|
||||
|
Reference in New Issue
Block a user