IDE: no auto completion in comment at end of line

git-svn-id: trunk@17247 -
This commit is contained in:
mattias 2008-11-06 12:54:50 +00:00
parent 6e020f2d66
commit b5a8b6cbc4
2 changed files with 4 additions and 2 deletions

View File

@ -10710,7 +10710,7 @@ begin
Highlighter.SetRange(TSynEditStringList(Lines).Ranges[PosY]);
Highlighter.SetLine(Line, PosY);
PosX := XY.X;
if (PosX > 0) and (PosX <= Length(Line)) then
if (PosX > 0) and (PosX <= Length(Line)) then begin
while not Highlighter.GetEol do begin
Start := Highlighter.GetTokenPos + 1;
Token := Highlighter.GetToken;
@ -10722,6 +10722,7 @@ begin
end;
Highlighter.Next;
end;
end;
end;
Token := '';
Attri := nil;

View File

@ -3274,7 +3274,8 @@ procedure TSourceNotebook.OnSourceCompletionTimer(Sender: TObject);
// check if in a comment
Token:='';
Attri:=nil;
Attri:=nil;
dec(LogCaret.X);
if SrcEdit.EditorComponent.GetHighlighterAttriAtRowCol(LogCaret,Token,Attri)
and (Attri<>nil) and (Attri.Name=SYNS_AttrComment) then
begin