mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 01:40:02 -04:00
Remove update_selection side-effects (#4114)
This commit is contained in:
parent
85d9534491
commit
ef0cd56e48
1 changed files with 2 additions and 1 deletions
|
|
@ -288,7 +288,8 @@ function M.update_selection(buf, node, selection_mode)
|
||||||
-- "gv": Start Visual mode with the same area as the previous area and the same mode.
|
-- "gv": Start Visual mode with the same area as the previous area and the same mode.
|
||||||
-- Hence, area will be what we defined in "<" and ">" marks. We only feed `selection_mode` if it is
|
-- Hence, area will be what we defined in "<" and ">" marks. We only feed `selection_mode` if it is
|
||||||
-- different than previous `visualmode`, otherwise it will stop visual mode.
|
-- different than previous `visualmode`, otherwise it will stop visual mode.
|
||||||
api.nvim_feedkeys("gv" .. selection_mode, "x", false)
|
-- bang=true is provided to avoid gv side-effects
|
||||||
|
api.nvim_cmd({ cmd = "normal", bang = true, args = { "gv" .. selection_mode } }, {})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Byte length of node range
|
-- Byte length of node range
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue