Currently, renaming a file without changing the name will prompt for replacing and then delete the file. This will instead cancel the renaming if the old and new names are the same.
This commit is contained in:
parent
d5f989f373
commit
d63e7a2076
3
eval.go
3
eval.go
@ -1090,6 +1090,9 @@ func (e *callExpr) eval(app *app, args []string) {
|
|||||||
}
|
}
|
||||||
oldPathTo := filepath.Join(wd, curr.Name())
|
oldPathTo := filepath.Join(wd, curr.Name())
|
||||||
newPathTo := filepath.Join(wd, s)
|
newPathTo := filepath.Join(wd, s)
|
||||||
|
if oldPathTo == newPathTo {
|
||||||
|
return
|
||||||
|
}
|
||||||
app.nav.renameCache = []string{oldPathTo, newPathTo}
|
app.nav.renameCache = []string{oldPathTo, newPathTo}
|
||||||
|
|
||||||
if dir, _ := filepath.Split(s); dir != "" {
|
if dir, _ := filepath.Split(s); dir != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user