summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Lim <50560759+joelim-work@users.noreply.github.com>2024-03-25 06:13:17 +1100
committerGitHub <noreply@github.com>2024-03-24 20:13:17 +0100
commita1edda1f701778964d653a19013d06fbba6c1d18 (patch)
tree32a7903b89b9b5cf828d62f454e44c00da444b85
parentddcd308614d880dc6cc19d6b124c0aed9677cf3c (diff)
Clear only when cut succeeds (#1652)
-rw-r--r--nav.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/nav.go b/nav.go
index 288d7fb..d8830c1 100644
--- a/nav.go
+++ b/nav.go
@@ -1485,6 +1485,7 @@ func (nav *nav) moveAsync(app *app, srcs []string, dstDir string) {
}
if errCount == 0 {
+ app.ui.exprChan <- &callExpr{"clear", nil, 1}
app.ui.exprChan <- &callExpr{"echo", []string{"\033[0;32mMoved successfully\033[0m"}, 1}
}
//mark the current directory as updated for refresh
@@ -1507,19 +1508,6 @@ func (nav *nav) paste(app *app) error {
go nav.copyAsync(app, srcs, dstDir)
} else {
go nav.moveAsync(app, srcs, dstDir)
- if err := saveFiles(nil, false); err != nil {
- return fmt.Errorf("clearing copy/cut buffer: %s", err)
- }
-
- if gSingleMode {
- if err := nav.sync(); err != nil {
- return fmt.Errorf("paste: %s", err)
- }
- } else {
- if err := remote("send sync"); err != nil {
- return fmt.Errorf("paste: %s", err)
- }
- }
}
return nil