Closed adoyle-h closed 1 year ago
This is interesting; does vim.o.selection
not change how the visual selection marks are set? A few more points:
vim.o
as opposed to vim.opt
?In general though, thanks for taking the time to make a PR!
@kylechui
does
vim.o.selection
not change how the visual selection marks are set?
It doesn't change the selection marks. Just the last character of a line is not included. You can see :h selection
. The default value is inclusive
.
Why
vim.o
as opposed tovim.opt
?
:h vim.o
: Get or set editor options, like :set
:h vim.opt
: that vim.opt returns an Option object, not the value of the optionDoes this issue appear when using the other visual modes? e.g. visual block mode
I have tried this commit. Only regular visual mode has this issue. Visual line mode and Visual block mode both work well.
Does it work with multibyte chars?
Does it work with multibyte chars?
I see that multibyte chars test cases in https://github.com/kylechui/nvim-surround/blob/main/tests/basics_spec.lua#L398 . But it runs failed even in master branch. So I tried these multibyte texts and emoji manually, all work.
The style check is failing, I think probably because you changed the indentation size to 2? Please use indent size 4 + spaces instead of tabs, and I'll merge this in.
Thanks for taking the time to contribute! I really appreciate it
When vim.o.selection='exclusive', last character will be not included in selection. nvim-surround should keep same behavior.