fix(treesitter): handle &selection=exclusive

This commit is contained in:
altermo
2026-08-01 18:13:21 +02:00
parent 77dfa02f3e
commit 8695579636
2 changed files with 8 additions and 0 deletions

View File

@@ -357,6 +357,10 @@ local function get_selection()
pos1, pos2 = pos2, pos1
end
if vim.o.selection == 'exclusive' then
pos2[3] = pos2[3] - 1
end
if pos2[3] == #vim.fn.getline(pos2[2]) + 1 then
pos2[2] = pos2[2] + 1
pos2[3] = 0