mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-03 01:39:38 +02:00
SynEdit / IDE: Keep cursor at position, if codetools makes changes to toher location (like updating component names) issue #12344
git-svn-id: trunk@21829 -
This commit is contained in:
parent
53a1e55eb8
commit
d033ed3dfc
@ -1350,11 +1350,11 @@ begin
|
|||||||
NewBlockBegin, NewBlockEnd, KeyChar, Shift);
|
NewBlockBegin, NewBlockEnd, KeyChar, Shift);
|
||||||
if (CompareCarets(NewBlockBegin, NewBlockEnd) <> 0) or (Value <> '') then
|
if (CompareCarets(NewBlockBegin, NewBlockEnd) <> 0) or (Value <> '') then
|
||||||
begin
|
begin
|
||||||
TextBetweenPoints[NewBlockBegin, NewBlockEnd] := Value;
|
TextBetweenPointsEx[NewBlockBegin, NewBlockEnd, scamEnd] := Value;
|
||||||
TCustomSynEdit(F.CurrentEditor).SetFocus;
|
TCustomSynEdit(F.CurrentEditor).SetFocus;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
TextBetweenPoints[NewBlockBegin, NewBlockEnd] := ItemList[Position];
|
TextBetweenPointsEx[NewBlockBegin, NewBlockEnd, scamEnd] := ItemList[Position];
|
||||||
TCustomSynEdit(F.CurrentEditor).SetFocus;
|
TCustomSynEdit(F.CurrentEditor).SetFocus;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -176,6 +176,12 @@ type
|
|||||||
string; Line, Column: integer; var ReplaceAction: TSynReplaceAction) of object;
|
string; Line, Column: integer; var ReplaceAction: TSynReplaceAction) of object;
|
||||||
|
|
||||||
TSynEditCaretType = (ctVerticalLine, ctHorizontalLine, ctHalfBlock, ctBlock);
|
TSynEditCaretType = (ctVerticalLine, ctHorizontalLine, ctHalfBlock, ctBlock);
|
||||||
|
TSynCaretAdjustMode = ( // used in TextBetweenPointsEx
|
||||||
|
scamIgnore, // Caret stays at the same numeric values, if text is inserted before caret, the text moves, but the caret stays
|
||||||
|
scamAdjust, // Caret moves with text, if text is inserted
|
||||||
|
scamEnd,
|
||||||
|
scamBegin
|
||||||
|
);
|
||||||
|
|
||||||
TSynStateFlag = (sfCaretVisible, sfCaretChanged, sfHideCursor,
|
TSynStateFlag = (sfCaretVisible, sfCaretChanged, sfHideCursor,
|
||||||
sfEnsureCursorPos, sfEnsureCursorPosAtResize,
|
sfEnsureCursorPos, sfEnsureCursorPosAtResize,
|
||||||
@ -471,6 +477,8 @@ type
|
|||||||
procedure SetMouseActions(const AValue: TSynEditMouseActions);
|
procedure SetMouseActions(const AValue: TSynEditMouseActions);
|
||||||
procedure SetMouseSelActions(const AValue: TSynEditMouseActions);
|
procedure SetMouseSelActions(const AValue: TSynEditMouseActions);
|
||||||
procedure SetTextBetweenPoints(aStartPoint, aEndPoint: TPoint; const AValue: String);
|
procedure SetTextBetweenPoints(aStartPoint, aEndPoint: TPoint; const AValue: String);
|
||||||
|
procedure SetTextBetweenPointsEx(aStartPoint, aEndPoint: TPoint;
|
||||||
|
aCaretMode: TSynCaretAdjustMode; const AValue: String);
|
||||||
procedure SurrenderPrimarySelection;
|
procedure SurrenderPrimarySelection;
|
||||||
procedure BookMarkOptionsChanged(Sender: TObject);
|
procedure BookMarkOptionsChanged(Sender: TObject);
|
||||||
procedure ComputeCaret(X, Y: Integer);
|
procedure ComputeCaret(X, Y: Integer);
|
||||||
@ -850,7 +858,7 @@ type
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
procedure WndProc(var Msg: TMessage); override;
|
procedure WndProc(var Msg: TMessage); override;
|
||||||
public
|
public
|
||||||
procedure InsertTextAtCaret(aText: String);
|
procedure InsertTextAtCaret(aText: String; aCaretMode : TSynCaretAdjustMode = scamEnd);
|
||||||
property BlockBegin: TPoint read GetBlockBegin write SetBlockBegin; // Set Blockbegin. For none persistent also sets Blockend. Setting Caret may undo this and should be done before setting block
|
property BlockBegin: TPoint read GetBlockBegin write SetBlockBegin; // Set Blockbegin. For none persistent also sets Blockend. Setting Caret may undo this and should be done before setting block
|
||||||
property BlockEnd: TPoint read GetBlockEnd write SetBlockEnd;
|
property BlockEnd: TPoint read GetBlockEnd write SetBlockEnd;
|
||||||
property FoldState: String read GetFoldState write SetFoldState;
|
property FoldState: String read GetFoldState write SetFoldState;
|
||||||
@ -890,6 +898,8 @@ type
|
|||||||
// Logical Points
|
// Logical Points
|
||||||
property TextBetweenPoints[aStartPoint, aEndPoint: TPoint]: String
|
property TextBetweenPoints[aStartPoint, aEndPoint: TPoint]: String
|
||||||
read GetTextBetweenPoints write SetTextBetweenPoints;
|
read GetTextBetweenPoints write SetTextBetweenPoints;
|
||||||
|
property TextBetweenPointsEx[aStartPoint, aEndPoint: TPoint; CaretMode: TSynCaretAdjustMode]: String
|
||||||
|
write SetTextBetweenPointsEx;
|
||||||
property TopLine: Integer read fTopLine write SetTopLine;
|
property TopLine: Integer read fTopLine write SetTopLine;
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
property UseUTF8: boolean read FUseUTF8;
|
property UseUTF8: boolean read FUseUTF8;
|
||||||
@ -1816,6 +1826,8 @@ begin
|
|||||||
FreeAndNil(FHookedKeyTranslationList);
|
FreeAndNil(FHookedKeyTranslationList);
|
||||||
fHookedCommandHandlers:=nil;
|
fHookedCommandHandlers:=nil;
|
||||||
fPlugins:=nil;
|
fPlugins:=nil;
|
||||||
|
FCaret.Lines := nil;
|
||||||
|
FInternalCaret.Lines := nil;
|
||||||
FreeAndNil(fScrollTimer);
|
FreeAndNil(fScrollTimer);
|
||||||
FreeAndNil(fTSearch);
|
FreeAndNil(fTSearch);
|
||||||
FreeAndNil(fMarkupManager);
|
FreeAndNil(fMarkupManager);
|
||||||
@ -1832,12 +1844,12 @@ begin
|
|||||||
FreeAndNil(fTextDrawer);
|
FreeAndNil(fTextDrawer);
|
||||||
FreeAndNil(fFontDummy);
|
FreeAndNil(fFontDummy);
|
||||||
FreeAndNil(FWordBreaker);
|
FreeAndNil(FWordBreaker);
|
||||||
FreeAndNil(FFoldedLinesView);
|
FreeAndNil(FFoldedLinesView); // has reference to caret
|
||||||
FreeAndNil(FInternalBlockSelection);
|
FreeAndNil(FInternalBlockSelection);
|
||||||
FreeAndNil(FBlockSelection);
|
FreeAndNil(FBlockSelection);
|
||||||
FreeAndNil(FStrings);
|
FreeAndNil(FStrings);
|
||||||
FreeAndNil(FTabbedLinesView);
|
FreeAndNil(FTabbedLinesView);
|
||||||
FreeAndNil(FTrimmedLinesView);
|
FreeAndNil(FTrimmedLinesView); // has reference to caret
|
||||||
FreeAndNil(FDoubleWidthChrLinesView);
|
FreeAndNil(FDoubleWidthChrLinesView);
|
||||||
FreeAndNil(fLines);
|
FreeAndNil(fLines);
|
||||||
FreeAndNil(fCaret);
|
FreeAndNil(fCaret);
|
||||||
@ -4977,8 +4989,29 @@ begin
|
|||||||
FInternalBlockSelection.StartLineBytePos := aStartPoint;
|
FInternalBlockSelection.StartLineBytePos := aStartPoint;
|
||||||
FInternalBlockSelection.EndLineBytePos := aEndPoint;
|
FInternalBlockSelection.EndLineBytePos := aEndPoint;
|
||||||
FInternalBlockSelection.SelText := AValue;
|
FInternalBlockSelection.SelText := AValue;
|
||||||
|
finally
|
||||||
|
EndUndoBlock;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCustomSynEdit.SetTextBetweenPointsEx(aStartPoint, aEndPoint: TPoint;
|
||||||
|
aCaretMode: TSynCaretAdjustMode; const AValue: String);
|
||||||
|
begin
|
||||||
|
BeginUndoBlock;
|
||||||
|
try
|
||||||
|
if aCaretMode = scamAdjust then
|
||||||
|
FCaret.AutoMoveOnEdit := True;
|
||||||
|
FInternalBlockSelection.SelectionMode := smNormal;
|
||||||
|
FInternalBlockSelection.StartLineBytePos := aStartPoint;
|
||||||
|
FInternalBlockSelection.EndLineBytePos := aEndPoint;
|
||||||
|
if aCaretMode = scamBegin then
|
||||||
|
FCaret.LineBytePos := FInternalBlockSelection.StartLineBytePos;
|
||||||
|
FInternalBlockSelection.SelText := AValue;
|
||||||
|
if aCaretMode = scamEnd then
|
||||||
FCaret.LineBytePos := FInternalBlockSelection.StartLineBytePos;
|
FCaret.LineBytePos := FInternalBlockSelection.StartLineBytePos;
|
||||||
finally
|
finally
|
||||||
|
if aCaretMode = scamAdjust then
|
||||||
|
FCaret.AutoMoveOnEdit := False;
|
||||||
EndUndoBlock;
|
EndUndoBlock;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -5089,9 +5122,9 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomSynEdit.InsertTextAtCaret(aText: String);
|
procedure TCustomSynEdit.InsertTextAtCaret(aText: String; aCaretMode : TSynCaretAdjustMode = scamEnd);
|
||||||
begin
|
begin
|
||||||
TextBetweenPoints[FCaret.LineBytePos, FCaret.LineBytePos] := aText;
|
TextBetweenPointsEx[FCaret.LineBytePos, FCaret.LineBytePos, aCaretMode] := aText;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomSynEdit.DragOver(Source: TObject; X, Y: Integer;
|
procedure TCustomSynEdit.DragOver(Source: TObject; X, Y: Integer;
|
||||||
@ -6063,7 +6096,7 @@ begin
|
|||||||
ecBlockCopy:
|
ecBlockCopy:
|
||||||
begin
|
begin
|
||||||
if SelAvail then
|
if SelAvail then
|
||||||
InsertTextAtCaret(FBlockSelection.SelText);
|
InsertTextAtCaret(FBlockSelection.SelText, scamEnd);
|
||||||
end;
|
end;
|
||||||
ecBlockDelete:
|
ecBlockDelete:
|
||||||
begin
|
begin
|
||||||
|
@ -54,6 +54,7 @@ type
|
|||||||
FLines: TSynEditStrings;
|
FLines: TSynEditStrings;
|
||||||
FOnChangeList: TMethodList;
|
FOnChangeList: TMethodList;
|
||||||
FLockCount: Integer;
|
FLockCount: Integer;
|
||||||
|
procedure SetLines(const AValue: TSynEditStrings); virtual;
|
||||||
procedure DoLock; virtual;
|
procedure DoLock; virtual;
|
||||||
Procedure DoUnlock; virtual;
|
Procedure DoUnlock; virtual;
|
||||||
public
|
public
|
||||||
@ -64,7 +65,7 @@ type
|
|||||||
procedure RemoveChangeHandler(AHandler: TNotifyEvent);
|
procedure RemoveChangeHandler(AHandler: TNotifyEvent);
|
||||||
procedure Lock;
|
procedure Lock;
|
||||||
Procedure Unlock;
|
Procedure Unlock;
|
||||||
property Lines: TSynEditStrings read FLines write FLines;
|
property Lines: TSynEditStrings read FLines write SetLines;
|
||||||
property Locked: Boolean read GetLocked;
|
property Locked: Boolean read GetLocked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -168,6 +169,7 @@ type
|
|||||||
TSynEditCaret = class(TSynEditPointBase)
|
TSynEditCaret = class(TSynEditPointBase)
|
||||||
private
|
private
|
||||||
FAllowPastEOL: Boolean;
|
FAllowPastEOL: Boolean;
|
||||||
|
FAutoMoveOnEdit: Boolean;
|
||||||
FForcePastEOL: Integer;
|
FForcePastEOL: Integer;
|
||||||
FForceAdjustToNextChar: Integer;
|
FForceAdjustToNextChar: Integer;
|
||||||
FKeepCaretX: Boolean;
|
FKeepCaretX: Boolean;
|
||||||
@ -200,10 +202,14 @@ type
|
|||||||
procedure SetLineText(const AValue : string);
|
procedure SetLineText(const AValue : string);
|
||||||
procedure SetSkipTabs(const AValue: Boolean);
|
procedure SetSkipTabs(const AValue: Boolean);
|
||||||
protected
|
protected
|
||||||
|
procedure SetLines(const AValue: TSynEditStrings); override;
|
||||||
procedure DoLock; override;
|
procedure DoLock; override;
|
||||||
Procedure DoUnlock; override;
|
Procedure DoUnlock; override;
|
||||||
|
procedure DoLinesEdited(Sender: TSynEditStrings; aLinePos, aBytePos, aCount,
|
||||||
|
aLineBrkCnt: Integer; aText: String);
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
|
destructor Destroy; override;
|
||||||
procedure AssignFrom(Src: TSynEditCaret);
|
procedure AssignFrom(Src: TSynEditCaret);
|
||||||
procedure IncForcePastEOL;
|
procedure IncForcePastEOL;
|
||||||
procedure DecForcePastEOL;
|
procedure DecForcePastEOL;
|
||||||
@ -228,6 +234,7 @@ type
|
|||||||
property AllowPastEOL: Boolean read FAllowPastEOL write SetAllowPastEOL;
|
property AllowPastEOL: Boolean read FAllowPastEOL write SetAllowPastEOL;
|
||||||
property KeepCaretX: Boolean read FKeepCaretX write SetKeepCaretX;
|
property KeepCaretX: Boolean read FKeepCaretX write SetKeepCaretX;
|
||||||
property MaxLeftChar: PInteger write FMaxLeftChar;
|
property MaxLeftChar: PInteger write FMaxLeftChar;
|
||||||
|
property AutoMoveOnEdit: Boolean write FAutoMoveOnEdit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -239,6 +246,11 @@ begin
|
|||||||
Result := FLockCount > 0;
|
Result := FLockCount > 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSynEditPointBase.SetLines(const AValue: TSynEditStrings);
|
||||||
|
begin
|
||||||
|
FLines := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TSynEditPointBase.DoLock;
|
procedure TSynEditPointBase.DoLock;
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
@ -298,6 +310,15 @@ begin
|
|||||||
fCharPos:= 1;
|
fCharPos:= 1;
|
||||||
FAllowPastEOL := True;
|
FAllowPastEOL := True;
|
||||||
FForcePastEOL := 0;
|
FForcePastEOL := 0;
|
||||||
|
if FLines <> nil then
|
||||||
|
FLines.AddEditHandler(@DoLinesEdited);
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TSynEditCaret.Destroy;
|
||||||
|
begin
|
||||||
|
if FLines <> nil then
|
||||||
|
FLines.RemoveEditHandler(@DoLinesEdited);
|
||||||
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynEditCaret.AssignFrom(Src: TSynEditCaret);
|
procedure TSynEditCaret.AssignFrom(Src: TSynEditCaret);
|
||||||
@ -519,6 +540,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSynEditCaret.SetLines(const AValue: TSynEditStrings);
|
||||||
|
begin
|
||||||
|
if FLines = AValue then exit;
|
||||||
|
if FLines <> nil then
|
||||||
|
FLines.RemoveEditHandler(@DoLinesEdited);
|
||||||
|
inherited SetLines(AValue);
|
||||||
|
if FLines <> nil then
|
||||||
|
FLines.AddEditHandler(@DoLinesEdited);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TSynEditCaret.DoLock;
|
procedure TSynEditCaret.DoLock;
|
||||||
begin
|
begin
|
||||||
FTouched := False;
|
FTouched := False;
|
||||||
@ -539,6 +570,47 @@ begin
|
|||||||
FOldLinePos := FLinePos;
|
FOldLinePos := FLinePos;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSynEditCaret.DoLinesEdited(Sender: TSynEditStrings; aLinePos, aBytePos, aCount,
|
||||||
|
aLineBrkCnt: Integer; aText: String);
|
||||||
|
// Todo: refactor / this is a copy from selection
|
||||||
|
function AdjustPoint(aPoint: Tpoint): TPoint; inline;
|
||||||
|
begin
|
||||||
|
Result := aPoint;
|
||||||
|
if aLineBrkCnt < 0 then begin
|
||||||
|
(* Lines Deleted *)
|
||||||
|
if aPoint.y > aLinePos then begin
|
||||||
|
Result.y := Max(aLinePos, Result.y + aLineBrkCnt);
|
||||||
|
if Result.y = aLinePos then
|
||||||
|
Result.x := Result.x + aBytePos - 1;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if aLineBrkCnt > 0 then begin
|
||||||
|
(* Lines Inserted *)
|
||||||
|
if (aPoint.y = aLinePos) and (aPoint.x >= aBytePos) then begin
|
||||||
|
Result.x := Result.x - aBytePos + 1;
|
||||||
|
Result.y := Result.y + aLineBrkCnt;
|
||||||
|
end;
|
||||||
|
if aPoint.y > aLinePos then begin
|
||||||
|
Result.y := Result.y + aLineBrkCnt;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if aCount <> 0 then begin
|
||||||
|
(* Chars Insert/Deleted *)
|
||||||
|
if (aPoint.y = aLinePos) and (aPoint.x >= aBytePos) then
|
||||||
|
Result.x := Max(aBytePos, Result.x + aCount);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if FAutoMoveOnEdit then begin
|
||||||
|
IncForcePastEOL;
|
||||||
|
LineBytePos := AdjustPoint(LineBytePos);
|
||||||
|
DecForcePastEOL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TSynEditSelection }
|
{ TSynEditSelection }
|
||||||
|
|
||||||
constructor TSynEditSelection.Create(ALines : TSynEditStrings; aActOnLineChanges: Boolean);
|
constructor TSynEditSelection.Create(ALines : TSynEditStrings; aActOnLineChanges: Boolean);
|
||||||
|
@ -2607,13 +2607,13 @@ procedure TSourceEditor.OnCodeBufferChanged(Sender: TSourceLog;
|
|||||||
var Txt: string;
|
var Txt: string;
|
||||||
begin
|
begin
|
||||||
if DirectionForward then begin
|
if DirectionForward then begin
|
||||||
FEditor.TextBetweenPoints[MoveToPos, MoveToPos] :=
|
FEditor.TextBetweenPointsEx[MoveToPos, MoveToPos, scamAdjust] :=
|
||||||
FEditor.TextBetweenPoints[StartPos, EndPos];
|
FEditor.TextBetweenPoints[StartPos, EndPos];
|
||||||
FEditor.TextBetweenPoints[StartPos, EndPos] := '';
|
FEditor.TextBetweenPointsEx[StartPos, EndPos, scamAdjust] := '';
|
||||||
end else begin
|
end else begin
|
||||||
Txt := FEditor.TextBetweenPoints[StartPos, EndPos];
|
Txt := FEditor.TextBetweenPoints[StartPos, EndPos];
|
||||||
FEditor.TextBetweenPoints[StartPos, EndPos] := '';
|
FEditor.TextBetweenPointsEx[StartPos, EndPos, scamAdjust] := '';
|
||||||
FEditor.TextBetweenPoints[MoveToPos, MoveToPos] := Txt;;
|
FEditor.TextBetweenPointsEx[MoveToPos, MoveToPos, scamAdjust] := Txt;;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2634,7 +2634,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Sender.AbsoluteToLineCol(SrcLogEntry.Position,StartPos.Y,StartPos.X);
|
Sender.AbsoluteToLineCol(SrcLogEntry.Position,StartPos.Y,StartPos.X);
|
||||||
if StartPos.Y>=1 then
|
if StartPos.Y>=1 then
|
||||||
FEditor.TextBetweenPoints[StartPos, StartPos] := SrcLogEntry.Txt;
|
FEditor.TextBetweenPointsEx[StartPos, StartPos, scamAdjust] := SrcLogEntry.Txt;
|
||||||
end;
|
end;
|
||||||
sleoDelete:
|
sleoDelete:
|
||||||
begin
|
begin
|
||||||
@ -2642,7 +2642,7 @@ begin
|
|||||||
Sender.AbsoluteToLineCol(SrcLogEntry.Position+SrcLogEntry.Len,
|
Sender.AbsoluteToLineCol(SrcLogEntry.Position+SrcLogEntry.Len,
|
||||||
EndPos.Y,EndPos.X);
|
EndPos.Y,EndPos.X);
|
||||||
if (StartPos.Y>=1) and (EndPos.Y>=1) then
|
if (StartPos.Y>=1) and (EndPos.Y>=1) then
|
||||||
FEditor.TextBetweenPoints[StartPos, EndPos] := '';
|
FEditor.TextBetweenPointsEx[StartPos, EndPos, scamAdjust] := '';
|
||||||
end;
|
end;
|
||||||
sleoMove:
|
sleoMove:
|
||||||
begin
|
begin
|
||||||
@ -2806,9 +2806,9 @@ procedure TSourceEditor.ReplaceLines(StartLine, EndLine: integer;
|
|||||||
const NewText: string);
|
const NewText: string);
|
||||||
begin
|
begin
|
||||||
if ReadOnly then Exit;
|
if ReadOnly then Exit;
|
||||||
FEditor.TextBetweenPoints[Point(1,StartLine),
|
FEditor.TextBetweenPointsEx[Point(1,StartLine),
|
||||||
Point(length(FEditor.Lines[Endline-1])+1,EndLine)] :=
|
Point(length(FEditor.Lines[Endline-1])+1,EndLine),
|
||||||
NewText;
|
scamEnd] := NewText;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSourceEditor.EncloseSelection;
|
procedure TSourceEditor.EncloseSelection;
|
||||||
@ -4020,7 +4020,7 @@ Begin
|
|||||||
SrcEdit:=GetActiveSE;
|
SrcEdit:=GetActiveSE;
|
||||||
Editor:=SrcEdit.EditorComponent;
|
Editor:=SrcEdit.EditorComponent;
|
||||||
if ValueType <> icvNone then
|
if ValueType <> icvNone then
|
||||||
Editor.TextBetweenPoints[SourceStart, SourceEnd] := NewValue;
|
Editor.TextBetweenPointsEx[SourceStart, SourceEnd, scamEnd] := NewValue;
|
||||||
if CursorToLeft>0 then
|
if CursorToLeft>0 then
|
||||||
begin
|
begin
|
||||||
NewCaretXY:=Editor.CaretXY;
|
NewCaretXY:=Editor.CaretXY;
|
||||||
|
Loading…
Reference in New Issue
Block a user