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 as RTF: Fix error when theme uses 3-digit colors (#XXX) #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

semaperepelitsa
Copy link

@semaperepelitsa semaperepelitsa commented Jul 4, 2022

In my theme I used a color "#777" which is rendered fine in TextMate but lead to an error in "Copy as RTF" command.

/Users/sema/Library/Application Support/TextMate/Managed/Bundles/TextMate.tmbundle/Support/lib/copy_as_rtf.rb:52:in `hex_color_to_rtf': undefined method `hex' for nil:NilClass (NoMethodError)

In this fix I have also added a fallback to #000 (black) color in case there are other ways to specify colors - at least there won't be an 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.

1 participant