aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/range.lua
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2026-05-19 01:08:26 +0800
committerGitHub <noreply@github.com>2026-05-18 13:08:26 -0400
commit450ba41436b6f9a94c7519339a0bdff8dfbf66a9 (patch)
treed6a778e90f1ddc0008a2c7fea5656abd084e4b37 /runtime/lua/vim/range.lua
parent47914449532f76aa50a7db61f50b7bb4ee391948 (diff)
downloadrneovim-450ba41436b6f9a94c7519339a0bdff8dfbf66a9.tar.gz
rneovim-450ba41436b6f9a94c7519339a0bdff8dfbf66a9.tar.bz2
rneovim-450ba41436b6f9a94c7519339a0bdff8dfbf66a9.zip
fix(api): adjust Visual position after nvim_buf_set_text #30690
Problem: Visual selection could end up in the wrong place after nvim_buf_set_text or nvim_buf_set_lines. In some delete cases, Visual.lnum was already clamped before the line shift happened, so the adjustment got skipped. Solution: Split fix_cursor_cols into reusable fix_pos_col logic and reuse it for Visual updates. Also adjust Visual.lnum before changed_lines so the shift uses the original position before final clamping.
Diffstat (limited to 'runtime/lua/vim/range.lua')
0 files changed, 0 insertions, 0 deletions