We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent daaf9e2 commit 14451c6Copy full SHA for 14451c6
1 file changed
lua/dired/init.lua
@@ -1397,13 +1397,14 @@ Browser.applyChanges = function(state)
1397
1398
-- rename
1399
local curline = api.nvim_win_get_cursor(state.win)[1]
1400
+ local curtext = buffer_lines[curline]:gsub('%s+', '')
1401
if
1402
state.entries[curline]
- and not vim.startswith(state.entries[curline].name, buffer_lines[curline])
1403
+ and curtext ~= state.entries[curline].name
1404
and #buffer_lines == #state.entries
1405
then
1406
local old = state.entries[curline].name
- local new = buffer_lines[curline]:gsub('%s+', '')
1407
+ local new = curtext
1408
local old_name = old:gsub(SEPARATOR .. '$', '')
1409
local new_name = new:gsub(SEPARATOR .. '$', '')
1410
0 commit comments