[QScintilla] Problems when pasting rectangular selections

Baz Walter bazwal at ftml.net
Sat Jun 9 01:25:57 BST 2012


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?






More information about the QScintilla mailing list