diff options
author | Joe Lim <50560759+joelim-work@users.noreply.github.com> | 2024-03-25 06:13:17 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-24 20:13:17 +0100 |
commit | a1edda1f701778964d653a19013d06fbba6c1d18 (patch) | |
tree | 32a7903b89b9b5cf828d62f454e44c00da444b85 | |
parent | ddcd308614d880dc6cc19d6b124c0aed9677cf3c (diff) |
Clear only when cut succeeds (#1652)
-rw-r--r-- | nav.go | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -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 |