-
Notifications
You must be signed in to change notification settings - Fork 484
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
Bug: selectioncount component gives the wrong size #1012
Comments
Should be fixed now |
Not yet fixed. It's also reporting wrong sizes when there are tabs, multibyte or wide characters. Looking at the code, in the formula In visual-block mode, the columns could be reported with the In visual mode, single line, the sizes should probably be reported by |
Just to mention (to keep things in one place) there is also #1032. |
I can confirm that #1042 works fine, but there are few things that i think should discussed:
|
I'm using brackets to group and easily distinguish the output from other information shown, but it's just personal preference. |
Then I think we need 5 "things" for formatting this 5 cases:
As of what can be used as mentioned "things" i see three options:
{
'selectioncount',
symbols = {
first = '[',
last = ']',
bytecount_separator = '-',
lines_separator = ' / ',
visual_block_line_symbols_separator = 'x',
},
}
{
'selectioncount',
format_functions = {
single_line_no_multibyte = {
function(chars)
return string.format('[%i]', chars)
end
},
single_line_multibyte = {
function(chars, bytes)
return string.format('[%i-%i]', chars, bytes)
end
},
multi_line_no_multibyte = {
function(chars, lines)
return string.format('[%i / %i]', chars, lines)
end
},
multi_line_multibyte = {
function(chars, bytes, lines)
return string.format('[%i-%i / %i]', chars, bytes, lines)
end
},
visual_block_mode = {
function(chars, lines)
return string.format('[%ix%i]', chars, lines)
end
},
},
}
{
'selectioncount',
format = {
single_line_no_multibyte = '[%c]',
single_line_multibyte = '[%c-%b]',
multi_line_no_multibyte = '[%c / %l]',
multi_line_multibyte = '[%c-%b / %l]',
visual_block_mode = '[%cx%l]',
},
} Here |
I think would vote for the 1st one, for simplicity. |
It's not working correctly for visual block mode with
neovim 0.9 on linux
The text was updated successfully, but these errors were encountered: