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

This reverts commit ddcd308614.
This commit is contained in:
Joe Lim authored and GitHub committed 2024-03-26 18:52:14 +11:00
1 parent c9d28f6e9d
commit 1e10e95f4d
2 files changed
+1 -11

No files matched your search

-5
View File
@@ -482,10 +482,6 @@ func (app *app) runCmdSync(cmd *exec.Cmd, pause_after bool) {
} }
app.ui.loadFile(app, true) app.ui.loadFile(app, true)
//mark the current directory as updated for refresh
app.nav.currDir().updated = true
app.nav.renew() app.nav.renew()
} }
@@ -521,7 +517,6 @@ func (app *app) runShell(s string, args []string, prefix string) {
cmd.Stderr = os.Stderr cmd.Stderr = os.Stderr
app.runCmdSync(cmd, prefix == "!") app.runCmdSync(cmd, prefix == "!")
return return
} }
+1 -6
View File
@@ -179,7 +179,6 @@ type dir struct {
ignoredia bool // ignoredia value from last sort ignoredia bool // ignoredia value from last sort
noPerm bool // whether lf has no permission to open the directory noPerm bool // whether lf has no permission to open the directory
lines []string // lines of text to display if directory previews are enabled 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 { func newDir(path string) *dir {
@@ -522,7 +521,7 @@ func (nav *nav) checkDir(dir *dir) {
} }
switch { switch {
case s.ModTime().After(dir.loadTime) || dir.updated: case s.ModTime().After(dir.loadTime):
now := time.Now() now := time.Now()
// XXX: Linux builtin exFAT drivers are able to predict modifications in the future // XXX: Linux builtin exFAT drivers are able to predict modifications in the future
@@ -1373,8 +1372,6 @@ loop:
if errCount == 0 { if errCount == 0 {
app.ui.exprChan <- &callExpr{"echo", []string{"\033[0;32mCopied successfully\033[0m"}, 1} 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) { func (nav *nav) moveAsync(app *app, srcs []string, dstDir string) {
@@ -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{"clear", nil, 1}
app.ui.exprChan <- &callExpr{"echo", []string{"\033[0;32mMoved successfully\033[0m"}, 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 { func (nav *nav) paste(app *app) error {