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

Support custom colors for drawbox characters #1251

Merged
merged 1 commit into from
May 20, 2023
Merged

Support custom colors for drawbox characters #1251

merged 1 commit into from
May 20, 2023

Conversation

joelim-work
Copy link
Collaborator

Fixes #902

Add a new borderfmt option to allow setting the pane borders to a custom color.


In addition a new utility function parseEscapeSequence is added, which basically converts a string to a tcell.Style object. I think this function is better than the existing optionToFmtstr function for processing some of the other formatting options like numberfmt and tagfmt.

For example, it is now possible to write this:

win.print(screen, 0, i, parseEscapeSequence(gOpts.numberfmt), ln)

Instead of this:

win.print(screen, 0, i, tcell.StyleDefault, fmt.Sprintf(optionToFmtstr(gOpts.numberfmt), ln))

@gokcehan
Copy link
Owner

@joelim-work Looks good, thanks for the patch.

@gokcehan gokcehan merged commit 3b942a8 into gokcehan:master May 20, 2023
@joelim-work joelim-work deleted the borderfmt branch May 21, 2023 01:45
@joelim-work
Copy link
Collaborator Author

@asklow Have a look at the borderfmt option in the documentation.

@gokcehan gokcehan mentioned this pull request Sep 17, 2023
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.

colour of pane borders
2 participants