mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 11:38:16 +02:00
SynEdit: revert 52474 #1c0abfedcb/52478 #2a7afe821b // more precise change indicator gutter. Issue #30152
git-svn-id: trunk@52761 -
This commit is contained in:
parent
42fe1e0f32
commit
6b321fe144
@ -1333,23 +1333,15 @@ end;
|
|||||||
procedure TSynEditStringList.EditLineBreak(LogX, LogY: Integer);
|
procedure TSynEditStringList.EditLineBreak(LogX, LogY: Integer);
|
||||||
var
|
var
|
||||||
s: string;
|
s: string;
|
||||||
Y1, Y2: Integer;
|
|
||||||
begin
|
begin
|
||||||
IncIsInEditAction;
|
IncIsInEditAction;
|
||||||
if Count = 0 then Add('');
|
if Count = 0 then Add('');
|
||||||
s := Strings[LogY - 1];
|
s := Strings[LogY - 1];
|
||||||
Y1 := LogY;
|
|
||||||
if LogX - 1 < length(s) then
|
if LogX - 1 < length(s) then
|
||||||
Strings[LogY - 1] := copy(s, 1, LogX - 1)
|
Strings[LogY - 1] := copy(s, 1, LogX - 1);
|
||||||
else
|
|
||||||
inc(Y1);
|
|
||||||
Insert(LogY, copy(s, LogX, length(s)));
|
Insert(LogY, copy(s, LogX, length(s)));
|
||||||
CurUndoList.AddChange(TSynEditUndoTxtLineBreak.Create(LogY));
|
CurUndoList.AddChange(TSynEditUndoTxtLineBreak.Create(LogY));
|
||||||
if LogX > 1 then
|
MarkModified(LogY, LogY + 1);
|
||||||
Y2 := LogY + 1
|
|
||||||
else
|
|
||||||
Y2 := Y1;
|
|
||||||
MarkModified(Y1, Y2);
|
|
||||||
SendNotification(senrEditAction, self, LogY, 1, LogX, 0, '');
|
SendNotification(senrEditAction, self, LogY, 1, LogX, 0, '');
|
||||||
DecIsInEditAction;
|
DecIsInEditAction;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user