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

Add on-select event #864

Merged
merged 1 commit into from
Oct 15, 2022
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
6 changes: 3 additions & 3 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ func (app *app) loop() {
curr, err := app.nav.currFile()
if err == nil {
if d.path == app.nav.currDir().path {
app.ui.loadFile(app.nav, true)
app.ui.loadFile(app, true)
}
if d.path == curr.path {
app.ui.dirPrev = d
Expand Down Expand Up @@ -462,7 +462,7 @@ func (app *app) loop() {
app.ui.draw(app.nav)
case <-app.ticker.C:
app.nav.renew()
app.ui.loadFile(app.nav, false)
app.ui.loadFile(app, false)
app.ui.draw(app.nav)
}
}
Expand Down Expand Up @@ -536,7 +536,7 @@ func (app *app) runShell(s string, args []string, prefix string) {
anyKey()
}

app.ui.loadFile(app.nav, true)
app.ui.loadFile(app, true)

switch prefix {
case "%":
Expand Down
5 changes: 5 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ The following special shell commands are used to customize the behavior of lf wh
delete
pre-cd
on-cd
on-select
on-quit

The following commands/keybindings are provided by default:
Expand Down Expand Up @@ -904,6 +905,10 @@ This shell command can be defined to be executed before changing a directory.

This shell command can be defined to be executed after changing a directory.

on-select

This shell command can be defined to be executed after the selection changes.

on-quit

This shell command can be defined to be executed before quit.
Expand Down
6 changes: 6 additions & 0 deletions docstring.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading