diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/ts_utils.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/ts_utils.lua b/lua/nvim-treesitter/ts_utils.lua index bfe6170b1..f0409d66d 100644 --- a/lua/nvim-treesitter/ts_utils.lua +++ b/lua/nvim-treesitter/ts_utils.lua @@ -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 |
