diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-12-24 09:48:59 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-24 09:48:59 +0800 |
| commit | d7b882697b5dc307a6396ec6163e41dfc74b076d (patch) | |
| tree | 85eb16b4da3bb8c21e851eaa19ab01d72e40cbc7 /runtime/lua/vim/_core/stringbuffer.lua | |
| parent | 2a2c366a3e48093740444d970e02774436ccc7ad (diff) | |
vim-patch:9.1.2017: getregionpos() depends on 'linebreak' setting (#37088)
Problem: getregionpos() depends on 'linebreak' setting
Solution: Reset linebreak setting temporarily (McAuley Penney)
When a line is wrapped on word boundaries, getregionpos() may report a
different end column for a visual block than the cursor position used to
define the selection.
Update the blockwise calculation in getregionpos() to use the same
wrapping assumptions as visual block mode, so the reported region
matches the selection boundaries.
Add a regression test that forces wrapping and checks that the end
position stays consistent under "setlocal wrap" and "setlocal
linebreak".
closes: vim/vim#19006
https://github.com/vim/vim/commit/8ea0e7205cdd16dbddd8981bd2429eca22c7386d
Co-authored-by: McAuley Penney <jacobmpenney@gmail.com>
Diffstat (limited to 'runtime/lua/vim/_core/stringbuffer.lua')
0 files changed, 0 insertions, 0 deletions
