Ticket #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: |
Description
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);
return;
}
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?
Note: See
TracTickets for help on using
tickets.
