You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if I use viw to select function name, range_from_source still return the whole line
Steps to reproduce
local start = vim.fn.getpos("v")
local end_ = vim.fn.getpos(".")
local start_row = start[2]
local start_col = start[3]
local end_row = end_[2]
local end_col = end_[3]
-- A user can start visual selection at the end and move backwards
-- Normalize the range to start < end
if start_row == end_row and end_col < start_col then
end_col, start_col = start_col, end_col
elseif end_row < start_row then
start_row, end_row = end_row, start_row
start_col, end_col = end_col, start_col
end
if vim.api.nvim_get_mode().mode == "V" then
start_col = 1
local lines = vim.api.nvim_buf_get_lines(0, end_row - 1, end_row, true)
end_col = #lines[1]
end
return {
["start"] = { start_row, start_col - 1 },
["end"] = { end_row, end_col - 1 },
}
Expected behavior
return exact column
Neovim version (nvim -v)
NVIM v0.10.1 Build type: Debug LuaJIT 2.1.1713484068 Run "nvim -V1 -v" for more info
lspsaga commit
latest
Terminal name/version
tmux
The text was updated successfully, but these errors were encountered:
Describe the bug
if I use viw to select function name, range_from_source still return the whole line
Steps to reproduce
Expected behavior
return exact column
Neovim version (nvim -v)
NVIM v0.10.1 Build type: Debug LuaJIT 2.1.1713484068 Run "nvim -V1 -v" for more info
lspsaga commit
latest
Terminal name/version
tmux
The text was updated successfully, but these errors were encountered: