Skip to content

Commit 87fb215

Browse files
committed
fix rename
1 parent 1603991 commit 87fb215

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/dired/init.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,9 @@ Browser.applyChanges = function(state)
14281428
local new = curtext
14291429
local old_name = old:gsub(SEPARATOR .. '$', '')
14301430
local new_name = new:gsub(SEPARATOR .. '$', '')
1431+
if not new_name:find('%w') then
1432+
return
1433+
end
14311434

14321435
local old_path = vim.fs.joinpath(path, old_name)
14331436
local new_path = vim.fs.joinpath(path, new_name)

0 commit comments

Comments
 (0)