Merge branch 'CompletionNextChar' into 'main'

SynEdit, Completion: Fix Last line not maintain right key because LogCaret.Y is One based

See merge request freepascal.org/lazarus/lazarus!104

(cherry picked from commit 6a5b9a627c)
This commit is contained in:
Martin 2022-08-05 21:37:47 +00:00
parent 2b37669e29
commit 66ffa62a45

View File

@ -2876,7 +2876,7 @@ var
begin
if Editor=nil then exit;
LogCaret:=Editor.LogicalCaretXY;
if LogCaret.Y>=Editor.Lines.Count then exit;
if LogCaret.Y>Editor.Lines.Count then exit; //* LogCaret.Y One Based
Line:=Editor.Lines[LogCaret.Y-1];
if LogCaret.X>length(Line) then exit;
CharLen:=UTF8CodepointSize(@Line[LogCaret.X]);
@ -11588,6 +11588,5 @@ initialization
finalization
InternalFinal;
end.