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

Copy to clipboard with full color #3045

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

ltrzesniewski
Copy link
Contributor

I was bored so I wrote this 😅

Fixes #3039

Problem

Solution

  • Any comments on the approach taken, its consistency with surrounding code, etc.

    • I took the HTML copy code from AvalonEdit's Selection.CreateHtmlFragment as a baseline
    • The new code creates a HighlightedLine from the active RichTextModel
    • It then merges it into the one provided by the IHighlighter
  • Which part of this PR is most in need of attention/improvement?

    The code is straightforward enough. I only wondered if this situation (having multiple DocumentColorizingTransformer instances) is common enough to warrant being handled by AvalonEdit itself, but that would require a rather large refactoring.

  • At least one test covering the code changed

    No test; only the UI part changed.

@siegfriedpammer siegfriedpammer merged commit d1ac27e into icsharpcode:master Aug 1, 2023
5 checks passed
@siegfriedpammer
Copy link
Member

Thank you very much! :)

@ltrzesniewski ltrzesniewski deleted the colored-copy branch August 1, 2023 19:41
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.

Feature request: copy to clipboard with formatting
2 participants