Skip to content

Commit

Permalink
allow linking up an exitNode, just like regular insertNode.
Browse files Browse the repository at this point in the history
It is capable of handling children.
  • Loading branch information
L3MON4D3 committed Jul 7, 2023
1 parent a5c0105 commit 748cd3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/luasnip/nodes/snippet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ local function insert_into_jumplist(snippet, start_node, current_node, parent_no
end

if parent_node then
local can_link_parent_node = vim.tbl_contains({types.insertNode, types.snippetNode}, rawget(parent_node, "type"))
local can_link_parent_node = vim.tbl_contains({types.insertNode, types.snippetNode, types.exitNode}, rawget(parent_node, "type"))
-- snippetNode (which has to be empty to be viable here) and
-- insertNode can both deal with inserting a snippet inside them
-- (ie. hooking it up st. it can be visited after jumping back to
Expand Down

0 comments on commit 748cd3f

Please sign in to comment.