Skip to content

Commit

Permalink
Revert "Trigger update after copy/move (#1638)" (#1661)
Browse files Browse the repository at this point in the history
This reverts commit ddcd308.
  • Loading branch information
joelim-work committed Mar 26, 2024
1 parent c9d28f6 commit 1e10e95
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
5 changes: 0 additions & 5 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,6 @@ func (app *app) runCmdSync(cmd *exec.Cmd, pause_after bool) {
}

app.ui.loadFile(app, true)

//mark the current directory as updated for refresh
app.nav.currDir().updated = true

app.nav.renew()
}

Expand Down Expand Up @@ -521,7 +517,6 @@ func (app *app) runShell(s string, args []string, prefix string) {
cmd.Stderr = os.Stderr

app.runCmdSync(cmd, prefix == "!")

return
}

Expand Down
7 changes: 1 addition & 6 deletions nav.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ type dir struct {
ignoredia bool // ignoredia value from last sort
noPerm bool // whether lf has no permission to open the directory
lines []string // lines of text to display if directory previews are enabled
updated bool // directory has been updated after last dirCheck
}

func newDir(path string) *dir {
Expand Down Expand Up @@ -522,7 +521,7 @@ func (nav *nav) checkDir(dir *dir) {
}

switch {
case s.ModTime().After(dir.loadTime) || dir.updated:
case s.ModTime().After(dir.loadTime):
now := time.Now()

// XXX: Linux builtin exFAT drivers are able to predict modifications in the future
Expand Down Expand Up @@ -1373,8 +1372,6 @@ loop:
if errCount == 0 {
app.ui.exprChan <- &callExpr{"echo", []string{"\033[0;32mCopied successfully\033[0m"}, 1}
}
//mark the current directory as updated for refresh
nav.currDir().updated = true
}

func (nav *nav) moveAsync(app *app, srcs []string, dstDir string) {
Expand Down Expand Up @@ -1488,8 +1485,6 @@ func (nav *nav) moveAsync(app *app, srcs []string, dstDir string) {
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
nav.currDir().updated = true
}

func (nav *nav) paste(app *app) error {
Expand Down

0 comments on commit 1e10e95

Please sign in to comment.