fix(lua): vim.hl.on_yank highlights wrong region with yi' (#32850)

Problem: yi' don't highlight last character since
8ce504820a.

Solution: Always use `opts.inclusive=true`, since calculation of `"]`
(`b_op_end`) have taken `inclusive` into account.
This commit is contained in:
phanium
2025-03-13 09:11:08 +08:00
committed by GitHub
parent b25527d20d
commit d832518ec6
2 changed files with 34 additions and 1 deletions

View File

@@ -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,
})