Author Topic: trouble with Line-selection paste - incorrectly splits lines  (Read 11490 times)

brainsalad

  • Community Member
  • Posts: 11
  • Hero Points: 2
Re: trouble with Line-selection paste - incorrectly splits lines
« Reply #15 on: July 18, 2009, 08:43:37 PM »
I'm experiencing the same problem with SlickEdit 2009 14.0.2.2, XQuartz 2.3.3.2, and OS X 10.5.7.  Both smart line pasting and being able to copy/paste to other applications are important to me.

Also, as rajkej pointed out, moving SlickEdit out of the X11 ghetto would fix this issue.

brainsalad

  • Community Member
  • Posts: 11
  • Hero Points: 2
Re: trouble with Line-selection paste - incorrectly splits lines
« Reply #16 on: August 04, 2009, 09:35:27 AM »
When clipboard synchronization is enabled both ways, ie XQuartz clipboard <-> OS X pasteboard, the problem appears.  When set to synchronize only one way, either way, the line copy problem does not manifest.

I suspect that if XQuartz is set to synchronize both ways, the following occurs when a line is copied in SlickEdit:

  • SlickEdit places the line in the X11 clipboard with metadata indicating that the clipboard contents represent a full line
  • Detecting that the X11 clipboard has changed, XQuartz replaces the OS X pasteboard with the X11 clipboard, omitting metadata
  • Detecting that the OS X pasteboard has changed, XQuartz replaces the X11 clipboard with the OS X pasteboard, omitting metadata

The final step wipes out the metadata in the X11 clipboard indicating that the clipboard contents represent a complete line of text.  Has anyone else made any progress towards resolving this issue without disabling synchronization?  If not, I might try attaching a debugger to a debug build of XQuartz so that I can step through the clipboard/pasteboard synchronization code in order to verify my educated guess about its behavior in our scenario.  If I'm correct, the issue may be correctable with a simple patch to XQuartz.