Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
fix(swap): escape Select Mode before swap
Browse files Browse the repository at this point in the history
  • Loading branch information
ziontee113 committed Feb 19, 2023
1 parent af159da commit 1afc97a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/SelectEase/lib/select_ts_nodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ M.select_node = function(opts)
end

M.swap_nodes = function(opts)
if vim.fn.mode() == "s" then
vim.cmd("norm! ")
end

local queries = opts.queries or {}
local nodes = lib_get_ts_nodes.get_nodes_from_query(opts.query, queries)

Expand Down

0 comments on commit 1afc97a

Please sign in to comment.