Skip to content

Comments

Copy as RTF: Fix error when theme uses 3-digit colors (#XXX)#6

Open
semaperepelitsa wants to merge 1 commit intotextmate:masterfrom
semaperepelitsa:copy-as-rtf-fix
Open

Copy as RTF: Fix error when theme uses 3-digit colors (#XXX)#6
semaperepelitsa wants to merge 1 commit intotextmate:masterfrom
semaperepelitsa:copy-as-rtf-fix

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