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

getregionpos() wrong with blockwise mode and multibyte #14805

Closed
wants to merge 1 commit into from

Conversation

zeertzjq
Copy link
Member

@zeertzjq zeertzjq commented May 20, 2024

Problem: getregionpos() wrong with blockwise mode and multibyte.
Solution: Use textcol and textlen instead of start_vcol and end_vcol.
Handle coladd properly.

Also remove unnecessary buflist_findnr() in add_regionpos_range(), as
getregionpos() has already switched buffer.

@zeertzjq zeertzjq force-pushed the getregionpos-mbyte branch 3 times, most recently from 7d7e333 to 4ea5cf6 Compare May 20, 2024 01:29
Problem:  getregionpos() wrong with blockwise mode and multibyte.
Solution: Use textcol and textlen instead of start_vcol and end_vcol.
          Handle coladd properly.

Also remove unnecessary buflist_findnr() in add_regionpos_range(), as
getregionpos() has already switched buffer.
@chrisbra
Copy link
Member

thanks!

@chrisbra chrisbra closed this in c95e64f May 20, 2024
@zeertzjq zeertzjq deleted the getregionpos-mbyte branch May 20, 2024 12:35
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request May 20, 2024
…ibyte

Problem:  getregionpos() wrong with blockwise mode and multibyte.
Solution: Use textcol and textlen instead of start_vcol and end_vcol.
          Handle coladd properly (zeertzjq).

Also remove unnecessary buflist_findnr() in add_regionpos_range(), as
getregionpos() has already switched buffer.

closes: vim/vim#14805

vim/vim@c95e64f
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request May 20, 2024
…ibyte

Problem:  getregionpos() wrong with blockwise mode and multibyte.
Solution: Use textcol and textlen instead of start_vcol and end_vcol.
          Handle coladd properly (zeertzjq).

Also remove unnecessary buflist_findnr() in add_regionpos_range(), as
getregionpos() has already switched buffer.

closes: vim/vim#14805

vim/vim@c95e64f
@girishji
Copy link
Contributor

Thanks!

huangyingw pushed a commit to huangyingw/neovim that referenced this pull request May 31, 2024
…ibyte

Problem:  getregionpos() wrong with blockwise mode and multibyte.
Solution: Use textcol and textlen instead of start_vcol and end_vcol.
          Handle coladd properly (zeertzjq).

Also remove unnecessary buflist_findnr() in add_regionpos_range(), as
getregionpos() has already switched buffer.

closes: vim/vim#14805

vim/vim@c95e64f
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.

None yet

3 participants