Also stop at comma and parenthesis in detection of previous token. Fixes issue #1242

This commit is contained in:
Ansgar Becker
2009-08-05 19:26:30 +00:00
parent 08fcaa813b
commit 386187b99d
2 changed files with 4 additions and 4 deletions

View File

@ -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]