Add on-redraw hook command (#1479)
* Add `on-redraw` hook command * Add documentation
This commit is contained in:
1 parent
7c23c27c59
commit
b3cb2dc2b4
4 files changed
+25
No files matched your search
@@ -1151,6 +1151,12 @@ func onChdir(app *app) {
|
||||
}
|
||||
}
|
||||
|
||||
func onRedraw(app *app) {
|
||||
if cmd, ok := gOpts.cmds["on-redraw"]; ok {
|
||||
cmd.eval(app, nil)
|
||||
}
|
||||
}
|
||||
|
||||
func onSelect(app *app) {
|
||||
if cmd, ok := gOpts.cmds["on-select"]; ok {
|
||||
cmd.eval(app, nil)
|
||||
@@ -1944,6 +1950,7 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
dir.boundPos(app.nav.height)
|
||||
}
|
||||
app.ui.loadFile(app, true)
|
||||
onRedraw(app)
|
||||
case "load":
|
||||
if !app.nav.init {
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user