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

Add support for setting clipboard using OSC 52 escape sequence #37

Closed
wants to merge 4 commits into from

Conversation

unxed
Copy link
Contributor

@unxed unxed commented Nov 24, 2022

Useful if X11 is not available.

OSC 52 support table:
https://github.com/ojroques/vim-oscyank#vim-oscyank

@magiblot
Copy link
Owner

Hi Unxed! Thanks for the patch. Don't you think it would be better to first try accessing the X11 clipboard before using the OSC 52 escape sequence? This can be detected by checking whether clipboard_set_text_ex failed.

@unxed
Copy link
Contributor Author

unxed commented Nov 24, 2022

first try accessing the X11 clipboard before using the OSC 52 escape sequence

done!

@unxed
Copy link
Contributor Author

unxed commented Nov 24, 2022

Maybe the same code should be added to tvision internal editor control also

@magiblot
Copy link
Owner

magiblot commented Dec 5, 2022

I have added a few changes to your initial patch:

  • We cannot assume that stdout points to the terminal.
  • We cannot assume that text.data() is null-terminated.
  • This application is never built with Borland C++.

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.

None yet

2 participants