fix: leave the cursor moving when going on the cwd
This commit is contained in:
@@ -196,7 +196,7 @@ end
|
|||||||
|
|
||||||
function M.place_cursor_on_node()
|
function M.place_cursor_on_node()
|
||||||
local node = lib.get_node_at_cursor()
|
local node = lib.get_node_at_cursor()
|
||||||
if not node then return end
|
if not node or node.name == ".." then return end
|
||||||
local line = api.nvim_get_current_line()
|
local line = api.nvim_get_current_line()
|
||||||
local cursor = api.nvim_win_get_cursor(0)
|
local cursor = api.nvim_win_get_cursor(0)
|
||||||
local idx = vim.fn.stridx(line, node.name)
|
local idx = vim.fn.stridx(line, node.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user