astrand / xclip

Command line interface to the X11 clipboard
GNU General Public License v2.0
1.04k stars 75 forks source link

Fix the problem for large buffers #57

Closed hwangcc23 closed 5 years ago

hwangcc23 commented 5 years ago

Fix the issue #43(https://github.com/astrand/xclip/issues/43).

hwangcc23 commented 5 years ago

Ready to go. @astrand please help review. Thanks.

hwangcc23 commented 5 years ago

This PR should also fix the issue #34.

astrand commented 5 years ago

Thanks a lot for working on this! Unfortunately, since the fix was non-trivial and I'm very short on time now, it will be a little bit difficult to merge this right away. Are there any other people interested in trying out the fix and/or reviewing the code?

RogueScholar commented 5 years ago

@astrand I built from hwangcc23:fix-43 just over two weeks ago and haven't seen any issues or regressions in the interim, and it certainly does handle larger selections more efficiently since doing so. I'm not conversant enough in C to speak to the robustness of the code changes themselves, but all's well that ends well in my book. :smirk:

@hwangcc23 Nicely done. This wasn't an issue that concerned me very often, but it's nice to know I can go hog wild with copy/pastes from the terminal going forward if the situation calls for it. :1st_place_medal:

hwangcc23 commented 5 years ago

RogueScholar had tried the patch and not seen any issue. @astrand Is there any chance in merging this patch? Thanks.

astrand commented 5 years ago

Merged now, thanks for your contribution.

mckellyln commented 5 years ago

@astrand hi. I seem to get xclip running forever after this change. There are a few requestors and finished is 1 for one of them but then it loops forever due to the others.

mckellyln commented 5 years ago

I think if sloop > 0 then we need to always break out of while() when finished is true ?