mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 04:20:09 -04:00
Textobjects: set jump before going to adjacent_textobject
This commit is contained in:
parent
f3ed370643
commit
32271b26ef
4 changed files with 88 additions and 88 deletions
|
|
@ -1,6 +1,7 @@
|
|||
local api = vim.api
|
||||
|
||||
local parsers = require'nvim-treesitter.parsers'
|
||||
local utils = require'nvim-treesitter.utils'
|
||||
|
||||
local M = {}
|
||||
|
||||
|
|
@ -241,8 +242,7 @@ function M.swap_nodes(node_or_range1, node_or_range2, bufnr, cursor_to_second)
|
|||
vim.lsp.util.apply_text_edits({edit1, edit2}, bufnr)
|
||||
|
||||
if cursor_to_second then
|
||||
-- Set the item in jump list
|
||||
vim.cmd "normal! m'"
|
||||
utils.set_jump()
|
||||
|
||||
local char_delta = 0
|
||||
local line_delta = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue