fix bug for pattern recogniti
on of filename
This commit is contained in:
committed by
Kiyan
parent
bc8fa41d80
commit
7531c7023d
@@ -241,7 +241,8 @@ end
|
|||||||
function M.rename(node)
|
function M.rename(node)
|
||||||
if node.name == '..' then return end
|
if node.name == '..' then return end
|
||||||
|
|
||||||
local abs_path = string.gsub(node.absolute_path, node.name, '')
|
local namelen = node.name:len()
|
||||||
|
local abs_path = node.absolute_path:sub(0, namelen * (-1) -1)
|
||||||
local new_name = vim.fn.input("Rename " ..node.name.. " to ", abs_path)
|
local new_name = vim.fn.input("Rename " ..node.name.. " to ", abs_path)
|
||||||
clear_prompt()
|
clear_prompt()
|
||||||
if not new_name or #new_name == 0 then return end
|
if not new_name or #new_name == 0 then return end
|
||||||
|
|||||||
Reference in New Issue
Block a user