mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-06 19:58:22 +00:00
fix(scope): change from/to selection to make more sense
This commit is contained in:
parent
5200a8baa5
commit
e8dd394c01
1 changed files with 2 additions and 2 deletions
|
@ -623,9 +623,9 @@ function M.textobject(opts)
|
||||||
local parent = scope:parent()
|
local parent = scope:parent()
|
||||||
if not same or not parent then
|
if not same or not parent then
|
||||||
-- select the range
|
-- select the range
|
||||||
vim.api.nvim_win_set_cursor(0, to)
|
|
||||||
vim.cmd("normal! " .. (opts.linewise and "V" or "v"))
|
|
||||||
vim.api.nvim_win_set_cursor(0, from)
|
vim.api.nvim_win_set_cursor(0, from)
|
||||||
|
vim.cmd("normal! " .. (opts.linewise and "V" or "v"))
|
||||||
|
vim.api.nvim_win_set_cursor(0, to)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue