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
getregionpos() returns a list of buffer segments for a given range #14609
Labels
Comments
Closed
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this issue
May 19, 2024
Problem: Cannot get a list of positions describing a region (Justin M. Keyes, after v9.1.0120) Solution: Add the getregionpos() function (Shougo Matsushita) fixes: vim/vim#14609 closes: vim/vim#14617 vim/vim@b4757e6 Co-authored-by: Shougo Matsushita <[email protected]> Co-authored-by: Justin M. Keyes <[email protected]>
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this issue
May 19, 2024
Problem: Cannot get a list of positions describing a region (Justin M. Keyes, after v9.1.0120) Solution: Add the getregionpos() function (Shougo Matsushita) fixes: vim/vim#14609 closes: vim/vim#14617 vim/vim@b4757e6 Co-authored-by: Shougo Matsushita <[email protected]> Co-authored-by: Justin M. Keyes <[email protected]>
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this issue
May 20, 2024
Problem: Cannot get a list of positions describing a region (Justin M. Keyes, after v9.1.0120) Solution: Add the getregionpos() function (Shougo Matsushita) fixes: vim/vim#14609 closes: vim/vim#14617 vim/vim@b4757e6 Co-authored-by: Shougo Matsushita <[email protected]> Co-authored-by: Justin M. Keyes <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
A buffer region in Vim, is described by four parameters:
{pos1}, {pos2}, {regtype}, {inclusive}
Any function that accepts only
{pos1}, {pos2}
must either be reworked to also accept{regtype}, {inclusive}
, or the caller must manually figure out the buffer segments that map to the "region", and feed them into the function.Feature request
Extracted from discussion in #13998 (comment)
Introduce
getregionpos({pos1}, {pos2}, {regtype}, {inclusive})
which returns a list of start/end positions in the buffer.The text was updated successfully, but these errors were encountered: