IDE, SourceEditor: fix caret pos detection for auto complete (though for "." the phys and log increase are both 1)

git-svn-id: trunk@63313 -
This commit is contained in:
martin 2020-06-06 15:16:19 +00:00
parent b2785f3c32
commit dcc69156e5

View File

@ -2518,7 +2518,7 @@ Begin
//DebugLn(['TSourceNotebook.ccComplete ',KeyChar,' ',OldCompletionType=ctIdentCompletion]);
if (KeyChar='.') and (OldCompletionType=ctIdentCompletion) then
begin
SourceCompletionCaretXY:=Editor.CaretXY;
SourceCompletionCaretXY:=Editor.LogicalCaretXY;
AutoStartCompletionBoxTimer.AutoEnabled:=true;
end
else if prototypeAdded and EditorOpts.AutoDisplayFunctionPrototypes then
@ -3978,7 +3978,7 @@ begin
// completed
end else if CodeToolsOpts.IdentComplAutoStartAfterPoint then begin
// store caret position to detect caret changes
SourceCompletionCaretXY:=FEditor.CaretXY;
SourceCompletionCaretXY:=FEditor.LogicalCaretXY;
// add the char
inc(SourceCompletionCaretXY.x,length(AChar));
AutoStartCompletionBoxTimer.AutoEnabled:=true;
@ -11117,7 +11117,7 @@ begin
AutoStartCompletionBoxTimer.AutoEnabled:=false;
TempEditor := ActiveEditor;
if (TempEditor <> nil) and TempEditor.EditorComponent.Focused and
(ComparePoints(TempEditor.EditorComponent.CaretXY, SourceCompletionCaretXY) = 0)
(ComparePoints(TempEditor.EditorComponent.LogicalCaretXY, SourceCompletionCaretXY) = 0)
then begin
if CheckStartIdentCompletion then begin
end