From eabbf0bb29f4120314b487712fbf3d4c1b09c904 Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Sat, 30 Mar 2024 11:03:23 +0100 Subject: [PATCH] Ignore extension when renaming directory --- eval.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval.go b/eval.go index 47c8eebf..cbe35740 100644 --- a/eval.go +++ b/eval.go @@ -2196,8 +2196,8 @@ func (e *callExpr) eval(app *app, args []string) { normal(app) app.ui.cmdPrefix = "rename: " extension := filepath.Ext(curr.Name()) - if len(extension) == 0 || extension == curr.Name() { - // no extension or .hidden + if len(extension) == 0 || extension == curr.Name() || curr.IsDir() { + // no extension or .hidden or is directory app.ui.cmdAccLeft = append(app.ui.cmdAccLeft, []rune(curr.Name())...) } else { app.ui.cmdAccLeft = append(app.ui.cmdAccLeft, []rune(curr.Name()[:len(curr.Name())-len(extension)])...)