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

Fix load issue when deleting files #1292

Merged
merged 1 commit into from
Jun 8, 2023
Merged

Fix load issue when deleting files #1292

merged 1 commit into from
Jun 8, 2023

Conversation

joelim-work
Copy link
Collaborator

@joelim-work joelim-work commented Jun 8, 2023

When deleting files, reloading the directory is already handled by the thread performing the actual deletion:

lf/nav.go

Lines 1475 to 1484 in 027538e

if gSingleMode {
nav.renew()
app.ui.loadFile(app, true)
} else {
if err := remote("send load"); err != nil {
errCount++
echo.args[0] = fmt.Sprintf("[%d] %s", errCount, err)
app.ui.exprChan <- echo
}
}

The reload is also done called by the main thread - I don't know why that code exists, but it appears to be the root cause of #792. The actual analysis involved is quite complex so I won't repeat it here, but see #792 (comment) for more details.

@gokcehan
Copy link
Owner

gokcehan commented Jun 8, 2023

@joelim-work Thank you very much for investigating this issue. I have tried the patch and it fixes the issue for me. I'm not sure why there was an extra loading there either.

@gokcehan gokcehan merged commit 59f3219 into gokcehan:master Jun 8, 2023
@joelim-work joelim-work deleted the fix-delete-load branch June 9, 2023 01:36
@gokcehan gokcehan mentioned this pull request Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redraw window after delete
2 participants