[QScintilla] Problems when pasting rectangular selections

Phil Thompson phil at riverbankcomputing.com
Sat Jun 9 12:53:39 BST 2012


On Sat, 09 Jun 2012 01:25:57 +0100, Baz Walter <bazwal at ftml.net> wrote:
> On 08/06/12 09:19, Phil Thompson wrote:
>> Both should be fixed in the current snapshot.
> 
> Thanks Phil!
> 
> But I have now discovered another issue: on X11, copying rectangular 
> selections between applications does not work with the Python bindings.
> 
> I'm guessing this must have something to do with how the clipboard is 
> handled internally by PyQt - but anyway, the upshot is that the trailing

> null byte gets stripped off before it reaches the receiving application.
> 
> However, after looking at your fixes, I think I can see a fairly simple 
> way to deal with this.
> 
> The implementation for Windows uses an empty "MSDEVColumnSelect" 
> mimetype entry as a marker for rectangular text data, so why not add 
> something similar for X11 as a fallback mechanism? The existing null 
> byte hack could still be used for backwards compatibility, but if that 
> check failed, there would just need to be an additional hasFormat() test

> for the rectangular-marker.
> 
> What do you think?

I didn't want to do that because I wanted to be able to copy between
QScintilla and scite. However it looks like that only works going from
QScintilla to scite but not in the other direction - presumably because Qt
is stripping the marker '\0'. Tonight's snapshot will use an explicit mime
type.

Phil


More information about the QScintilla mailing list