Remove update_selection side-effects (#4114)

This commit is contained in:
coinator 2023-01-07 14:23:00 +01:00 committed by GitHub
parent 85d9534491
commit ef0cd56e48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.
-- 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.
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
-- Byte length of node range