[Padre-trac] [Padre] #390: Copy and Paste onto highlighted text

Padre trac at perlide.org
Wed Dec 30 14:09:03 PST 2009

#390: Copy and Paste onto highlighted text
 Reporter:  waxhead  |       Owner:  code4pay
     Type:  defect   |      Status:  accepted
 Priority:  major    |   Milestone:          
Component:  editor   |     Version:  0.53    
 Keywords:           |  

Comment(by code4pay):

 I made a commit http://padre.perlide.org/trac/changeset/10023,  which
 makes the middle mouse button on X11 work in a way similar to some other
 editing apps nedit, kate, kdevelop, komodo edit etc. This is achieved by
 basically letting the Wxcontrol just handle it (we don't call paste at
 all).  However some devs would prefer to keep the old behavior, (which
 would be my preference as well).

 The problem with trying to implement the previous middle button paste
 functionality is that on X11 the middle mouse will perform an X11 paste
 not matter what other actions you take in the code (If you remove all copy
 and paste statements X11 will still do the select and middle button
 paste).  Therefore if we do a paste  and there is text in the X11
 clipboard it will also perform a paste and you get 2 different texts

 One thought I had was to empty the X11 clipboard before we perform a
 paste.  Problem with this is it seems you can not replace the content of
 the X11 clipboard by sending it a null value. I tried ""  and undef with
 no luck.   There is also a clear function for the clipboard but this seems
 to only work on the primary clipboard.

 The other thought was to copy the content of the primary clipboard to the
 X11 clipboard. Then when X11 does its paste it will paste only our copied
 content.  This would prevent being able to copy on select from other apps
 and paste into Padre. And it would also mean that Padre would do an insert
 when pasting on highlighted text rather than an overwrite defeating the

 I will commit another change that will let the user choose between the
 10023 style or the previous style but the previous style will still remain
 broken, until some one can work out a way around the X11 pasting.

Ticket URL: <http://padre.perlide.org/trac/ticket/390#comment:16>
Padre <http://padre.perlide.org/>
Perl Application Development and Refactoring Environment

More information about the Padre-trac mailing list