load directories after copy/move

This commit is contained in:
Gokcehan 2019-02-26 21:04:51 +03:00
parent 4865ce9b00
commit 0f47c5428b
2 changed files with 16 additions and 6 deletions

View File

@ -616,12 +616,6 @@ func (e *callExpr) eval(app *app, args []string) {
app.ui.printf("paste: %s", err)
return
}
if err := sendRemote("send load"); err != nil {
app.ui.printf("paste: %s", err)
}
if err := sendRemote("send sync"); err != nil {
app.ui.printf("paste: %s", err)
}
case "delete":
if cmd, ok := gOpts.cmds["delete"]; ok {
cmd.eval(app, e.args)

16
nav.go
View File

@ -611,6 +611,12 @@ loop:
ui.exprChan <- echo
}
}
if err := sendRemote("send load"); err != nil {
errCount++
echo.args[0] = fmt.Sprintf("[%d] error: %s", errCount, err)
ui.exprChan <- echo
}
}
func moveAsync(ui *ui, srcs []string, dstDir string) {
@ -643,6 +649,12 @@ func moveAsync(ui *ui, srcs []string, dstDir string) {
ui.exprChan <- echo
}
}
if err := sendRemote("send load"); err != nil {
errCount++
echo.args[0] = fmt.Sprintf("[%d] error: %s", errCount, err)
ui.exprChan <- echo
}
}
func (nav *nav) paste(ui *ui) error {
@ -667,6 +679,10 @@ func (nav *nav) paste(ui *ui) error {
return fmt.Errorf("clearing copy/cut buffer: %s", err)
}
if err := sendRemote("send sync"); err != nil {
return fmt.Errorf("paste: %s", err)
}
return nil
}