Trigger update after copy/move (#1638)
* trigger update after copy/move * trigger refresh after returnign from shell * add renew after returning from shell * move file update
This commit is contained in:
1 parent
951795c789
commit
ddcd308614
2 files changed
+11
-1
No files matched your search
@@ -179,6 +179,7 @@ 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 {
|
||||
@@ -521,7 +522,7 @@ func (nav *nav) checkDir(dir *dir) {
|
||||
}
|
||||
|
||||
switch {
|
||||
case s.ModTime().After(dir.loadTime):
|
||||
case s.ModTime().After(dir.loadTime) || dir.updated:
|
||||
now := time.Now()
|
||||
|
||||
// XXX: Linux builtin exFAT drivers are able to predict modifications in the future
|
||||
@@ -1372,6 +1373,8 @@ 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) {
|
||||
@@ -1484,6 +1487,8 @@ func (nav *nav) moveAsync(app *app, srcs []string, dstDir string) {
|
||||
if errCount == 0 {
|
||||
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 {
|
||||
|
||||
Reference in new issue
Block a user