Opened 11 years ago

Last modified 11 years ago

#425 new enhancement

inserting a string at the current position

Reported by: szabgab Owned by:
Priority: major Milestone:
Component: editor Version: 0.38
Keywords: Cc:


I have a sub like this in My plugin that allows me to insert arbitrary text at the current position of the current page.

sub insert {
        my $text = shift;

        my $main = Padre->ide->wx->main;
        my $doc = $main->current->document;
        my $editor = $doc->editor;
        $editor->InsertText($editor->GetCurrentPos(), $text);

1) how could I simplify this?
2) I'd like to offer this as a simple method for the plugin writers where shall I put it and how shall I call it?

Change History (1)

comment:1 Changed 11 years ago by szabgab

  • Type changed from defect to enhancement
Note: See TracTickets for help on using tickets.