[Lazarus] Extending the IDE

Martin lazarus at mfriebe.de
Sun Jan 29 13:54:27 CET 2012


On 29/01/2012 06:49, Reinier Napoles Martinez wrote:
> procedure DuplicateLine(Sender: TObject);
> var
>    Editor: TSourceEditorInterface;
>    ASynEdit: TSynEdit;
> begin
>
>       Editor:=SourceEditorManagerIntf.ActiveEditor;
>       if Editor=nil then exit;
>       if Editor.EditorControl is TSynEdit then begin
>           ASynEdit:=TSynEdit(Editor.EditorControl);
>           ASynEdit.Lines.Insert(ASynEdit.CaretY, ASynEdit.LineText);
>       end;
>

Not the answer to your question, but...

    SynEdit.Lines.Insert
does not work with undo/redo

Lazarus Synedit has
   SynEdit.TextBetweenPoints[ Point(1, Y), Point(1, Y)] := 'Foo'+LineEnding;






More information about the Lazarus mailing list