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

fix(selectioncount) wrong sizes with multibyte, widechars and tabs. #1042

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

miguelbarao
Copy link

The original implementation of the selectioncount component had multiple issues (Bug #1012) and only worked with single cell, single byte characters (no tabs).
This implementations fixes the following issues:

  • tabs are correctly reported
  • wide chars in block selection mode count according to their screen size (1 or 2 cells)
  • multibyte utf8 chars report the correct size

As far as I can see, the results are the same as the ones reported by neovim in the cmdline.
The output was modified to include the total chars and bytes for multiple lines (was only reporting lines when more than one line was selected).
The output is shown in brackets.

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