Merged revision(s) 58181 #cc7bb6c248, 58189 #dc1a9b3fc8, 58209 #5aab88ba3c from trunk:

SynEdit: fix position of multi-caret (after EOL), when column selection is deleted. Issue #0032161
........
SynEdit: Fix toggle multi caret, patch by Pascal, issue #0029456
........
SynEdit, AutoComplete: prevent timer from accidental trigger. part of issue #0033665
........

git-svn-id: branches/fixes_1_8@58723 -
This commit is contained in:
maxim 2018-08-16 22:22:42 +00:00
parent 8f11d3465c
commit 9d20a3ac04
4 changed files with 11 additions and 9 deletions

View File

@ -628,6 +628,7 @@ begin
FHint.OnMouseDown :=@HintWindowMouseDown;
{$ENDIF}
FHintTimer := TTimer.Create(nil);
FHintTimer.Enabled := False;
FHintTimer.OnTimer := @OnHintTimer;
FHintTimer.Interval := 0;
FLongLineHintTime := 0;

View File

@ -1938,7 +1938,8 @@ var
FInternalCaret.LineCharPos := Point(l, y);
xb := FInternalCaret.BytePos;
FInternalCaret.LineCharPos := Point(r, y);
xe := Min(FInternalCaret.BytePos, 1 + length(FInternalCaret.LineText));
// xe := Min(FInternalCaret.BytePos, 1 + length(FInternalCaret.LineText));
xe := FInternalCaret.BytePos;
if xe > xb then
FLines.EditDelete(xb, y, xe - xb);
end;

View File

@ -1281,13 +1281,13 @@ begin
exit;
IncIsInEditAction;
s := Strings[LogY - 1];
if LogX - 1 > Length(s) then
exit;
Result := copy(s, LogX, ByteLen);
Strings[LogY - 1] := copy(s,1, LogX - 1) + copy(s, LogX + ByteLen, length(s));
if Result <> '' then
CurUndoList.AddChange(TSynEditUndoTxtDelete.Create(LogX, LogY, Result));
MarkModified(LogY, LogY);
if LogX - 1 <= Length(s) then begin
Result := copy(s, LogX, ByteLen);
Strings[LogY - 1] := copy(s,1, LogX - 1) + copy(s, LogX + ByteLen, length(s));
if Result <> '' then
CurUndoList.AddChange(TSynEditUndoTxtDelete.Create(LogX, LogY, Result));
MarkModified(LogY, LogY);
end;
SendNotification(senrEditAction, self, LogY, 0, LogX, -ByteLen, '');
DecIsInEditAction;
end;

View File

@ -2322,7 +2322,7 @@ begin
end;
ecPluginMultiCaretToggleCaret: begin
i := Carets.FindCaretIdx(CaretObj.BytePos, CaretObj.LinePos, CaretObj.BytePosOffset);
if (i > 0) or (sfCreateCaretAtCurrentPos in FStateFlags) then begin
if (i >= 0) or (sfCreateCaretAtCurrentPos in FStateFlags) then begin
exclude(FStateFlags, sfCreateCaretAtCurrentPos);
if i >= 0 then
RemoveCaret(i);