Skip to content

Update Clipboard to work across platforms - #13

Open
InfinaMii wants to merge 2 commits into
MapStudioProject:TrackStudioVersionfrom
InfinaMii:ts-fix-clipboard
Open

Update Clipboard to work across platforms#13
InfinaMii wants to merge 2 commits into
MapStudioProject:TrackStudioVersionfrom
InfinaMii:ts-fix-clipboard

Conversation

@InfinaMii

Copy link
Copy Markdown
  • Make Run method in Shell.cs public
  • Modify Clipboard.SetText and Clipboard.GetText to reuse Shell.Run rather than duplicating Process code
  • Remove Clipboard.Copy (unused) and move its platform checks to SetText
  • Update Linux copy functions to use Bash + correct commands based on session type
  • Add macOS and Linux functionality to Clipboard.Paste

- Make Run method in Shell.cs public
- Modify Clipboard.SetText and Clipboard.GetText to reuse Shell.Run rather than duplicating Process code
- Remove Clipboard.Copy (unused) and move its platform checks to SetText
- Update Linux copy functions to use Bash + correct commands based on session type
- Add macOS and Linux functionality to Clipboard.Paste
- Use StartsWith rather than == for Wayland detection in case output contains newline
- Add quotes around text to ensure it gets fed to wl-copy and xclip correctly
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.

1 participant