Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Trigger update after copy/move (#1638)" #1661

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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