summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Lim <50560759+joelim-work@users.noreply.github.com>2023-12-27 01:58:33 +1100
committerGitHub <noreply@github.com>2023-12-26 15:58:33 +0100
commit27cbf9403cf3bb6667a7909f3eef25c78d8c0282 (patch)
treebb191b8dd067a714516dcd1cb6ac4cd1361d1786
parent12ce64968161ae874c56c284a85206e983590d74 (diff)
Reload file info after `mark-save`/`mark-remove` (#1544)
-rw-r--r--eval.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/eval.go b/eval.go
index 3aa3c87..3f338eb 100644
--- a/eval.go
+++ b/eval.go
@@ -1451,16 +1451,20 @@ func insert(app *app, arg string) {
app.nav.marks[arg] = app.nav.currDir().path
if err := app.nav.writeMarks(); err != nil {
app.ui.echoerrf("mark-save: %s", err)
+ return
}
if gSingleMode {
if err := app.nav.sync(); err != nil {
app.ui.echoerrf("mark-save: %s", err)
+ return
}
} else {
if err := remote("send sync"); err != nil {
app.ui.echoerrf("mark-save: %s", err)
+ return
}
}
+ app.ui.loadFileInfo(app.nav)
case app.ui.cmdPrefix == "mark-load: ":
normal(app)
@@ -1505,12 +1509,15 @@ func insert(app *app, arg string) {
if gSingleMode {
if err := app.nav.sync(); err != nil {
app.ui.echoerrf("mark-remove: %s", err)
+ return
}
} else {
if err := remote("send sync"); err != nil {
app.ui.echoerrf("mark-remove: %s", err)
+ return
}
}
+ app.ui.loadFileInfo(app.nav)
case app.ui.cmdPrefix == ":" && len(app.ui.cmdAccLeft) == 0:
switch arg {
case "!", "$", "%", "&":