aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorphanium <91544758+phanen@users.noreply.github.com>2025-03-13 09:11:08 +0800
committerGitHub <noreply@github.com>2025-03-13 09:11:08 +0800
commitd832518ec6b4604c27d8ce9c9587a4641f2337fe (patch)
tree36d550bd7f6dfb35c98335af7c4f753cfd7b7a84 /runtime/lua/vim
parentb25527d20d9a5ae25f4a5e2d2d487e2eac731b2c (diff)
downloadrneovim-d832518ec6b4604c27d8ce9c9587a4641f2337fe.tar.gz
rneovim-d832518ec6b4604c27d8ce9c9587a4641f2337fe.tar.bz2
rneovim-d832518ec6b4604c27d8ce9c9587a4641f2337fe.zip
fix(lua): vim.hl.on_yank highlights wrong region with yi' (#32850)
Problem: yi' don't highlight last character since https://github.com/neovim/neovim/commit/8ce504820af04194a41acbe1f4c61cf12bd5feb5. Solution: Always use `opts.inclusive=true`, since calculation of `"]` (`b_op_end`) have taken `inclusive` into account.
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/hl.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/hl.lua b/runtime/lua/vim/hl.lua
index 070748d31e..a2b06c9727 100644
--- a/runtime/lua/vim/hl.lua
+++ b/runtime/lua/vim/hl.lua
@@ -182,7 +182,7 @@ function M.on_yank(opts)
vim.api.nvim__ns_set(yank_ns, { wins = { winid } })
M.range(bufnr, yank_ns, higroup, "'[", "']", {
regtype = event.regtype,
- inclusive = event.inclusive,
+ inclusive = true,
priority = opts.priority or M.priorities.user,
timeout = opts.timeout or 150,
})