Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INCR transfer bug fixes #16

Merged
merged 2 commits into from
Aug 11, 2016
Merged

INCR transfer bug fixes #16

merged 2 commits into from
Aug 11, 2016

Conversation

ebiggers
Copy link
Contributor

@ebiggers ebiggers commented Mar 6, 2016

No description provided.

ebiggers added 2 commits March 6, 2016 12:01
The target should be copied from that given in SelectionRequest, not set
to INCR.  This fixes a bug where it was impossible to paste > 4000
characters of text from xsel to the Chromium browser.  Note that some
programs, including Chromium, validate the 'target' that is passed back;
while other programs, such as those which use the GTK clipboard API,
ignore it.  But based the ICCCM, it appears that xsel is incorrect, not
chromium:

    "The owner should set the specified selection, target, time, and
    propety arguments to the values received in the SelectionRequest event."
This fixes a bug where xsel would only output the first 3999 characters
of the selection.
@wsdjeg
Copy link

wsdjeg commented Jun 4, 2016

@ebiggers I am not sure this patch will be merged, but I need this featue in neovim. as the issue opened here
neovim/neovim#4719
before it is merged, I am using xclip.

@justinmk
Copy link

justinmk commented Jun 4, 2016

@kfish can you comment?

@MaskRay
Copy link
Contributor

MaskRay commented Jun 14, 2016

In Arch Linux, the following script can mitigate the bug ( community/xsel-1.2.0-6 )

# zsh
xxd =xsel | sed -r 's/(00003930: .*)0f 8f9a 0000 00/\19090 9090 9090/' | xxd -r > /tmp/x && sudo cp /tmp/x =xsel

@kfish kfish merged commit b1a9e3d into kfish:master Aug 11, 2016
cstrahan added a commit to cstrahan/nixpkgs that referenced this pull request Sep 21, 2016
The last xsel release was in 2008. Since then, a number of bugs have
been fixed. For example, pasting a large chunk of text (>4000 chars)
into chrome would cause the current tab to hang indefinitely.

A couple examples in the wild:

kfish/xsel#14
kfish/xsel#13
kfish/xsel#16
https://bugs.chromium.org/p/chromium/issues/detail?id=515401
electron/electron#3116
neovim/neovim#4719
acowley pushed a commit to acowley/nixpkgs that referenced this pull request Sep 29, 2016
The last xsel release was in 2008. Since then, a number of bugs have
been fixed. For example, pasting a large chunk of text (>4000 chars)
into chrome would cause the current tab to hang indefinitely.

A couple examples in the wild:

kfish/xsel#14
kfish/xsel#13
kfish/xsel#16
https://bugs.chromium.org/p/chromium/issues/detail?id=515401
electron/electron#3116
neovim/neovim#4719
@akurilin
Copy link

Thank you for fixing this, @ebiggers .

@ThisGuyCodes ThisGuyCodes mentioned this pull request May 22, 2018
L-P added a commit to L-P/dotfiles that referenced this pull request Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants