Skip to content

Report failure to copy to clipboard #1410

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

Merged
merged 4 commits into from
Nov 5, 2022
Merged

Conversation

alexmaco
Copy link
Contributor

This Pull Request improves failures to copy to clipboard for more system configs.

Right now, when xsel and xclip fail, they return 1 but the status is never checked and execution seems successful.
Additionally, xsel's stderr output sometimes overwrites the screen in random places.

It changes the following:

  • preamble refactor of commit copying
  • reports subprocess failure from clipboard::exec_copy_with_args
  • opens failure popup without closing the application when copying to clipboard fails

I followed the checklist:

  • I added unittests
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

@extrawurst extrawurst merged commit e371153 into gitui-org:master Nov 5, 2022
@extrawurst
Copy link
Collaborator

Thank you for these improvements!

IndianBoy42 pushed a commit to IndianBoy42/gitui that referenced this pull request Jun 4, 2024
* (refactor) move copy_commit_hash from revlog into commitlist, and make fewer functions public in commitlist
* (refactor) reduce duplication in commit copying code; use already-stored commits instead of looking up items
* (clipboard) actually check subprocess exit status, and report failure instead of ignoring it
* (commitlist) display popup with copy failure instead of exiting the application on error
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.

2 participants