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

text.RuneCount should be called as text.RuneWidth #209

Closed
breezewish opened this issue Jun 19, 2022 · 2 comments
Closed

text.RuneCount should be called as text.RuneWidth #209

breezewish opened this issue Jun 19, 2022 · 2 comments

Comments

@breezewish
Copy link

Is your feature request related to a problem? Please describe.

The RuneCount function is actually implemented as calculating the rune width instead of rune count.

Describe the solution you'd like

Rename the function to RuneWidth.

@jedib0t
Copy link
Owner

jedib0t commented Jun 20, 2022

Agreed that it is misnamed. Will rename it in a few days (but leave the original function marked as deprecated).

jedib0t added a commit that referenced this issue Jun 20, 2022
@jedib0t
Copy link
Owner

jedib0t commented Jun 20, 2022

Fixed. Use tag https://github.com/jedib0t/go-pretty/releases/tag/v6.3.3 for the fix. Please note:

  • text.RuneCount is marked as deprecated and will be removed in the next major release
  • text.RuneWidthWithoutEscSequences is the replacement

@jedib0t jedib0t closed this as completed Jun 20, 2022
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

No branches or pull requests

2 participants