parent
f6cce2d40c
commit
288561a9ba
2
comp.go
2
comp.go
@ -32,6 +32,7 @@ var (
|
||||
"delete",
|
||||
"put",
|
||||
"clear",
|
||||
"redraw",
|
||||
"reload",
|
||||
"read",
|
||||
"read-shell",
|
||||
@ -43,7 +44,6 @@ var (
|
||||
"search-prev",
|
||||
"sync",
|
||||
"echo",
|
||||
"redraw",
|
||||
"cd",
|
||||
"push",
|
||||
}
|
||||
|
2
doc.go
2
doc.go
@ -30,6 +30,7 @@ The following commands are provided by lf with default keybindings:
|
||||
delete (default 'd')
|
||||
put (default 'p')
|
||||
clear (default 'c')
|
||||
redraw (default '<c-l>')
|
||||
reload (default '<c-r>')
|
||||
read (default ':')
|
||||
read-shell (default '$')
|
||||
@ -44,7 +45,6 @@ The following commands are provided by lf without default keybindings:
|
||||
|
||||
sync synchronizes yanked/deleted files with server
|
||||
echo prints its arguments to the message line
|
||||
redraw renew ui elements and redraw the screen
|
||||
cd changes working directory to its argument
|
||||
push simulate key pushes given in its argument
|
||||
|
||||
|
@ -34,6 +34,7 @@ The following commands are provided by lf with default keybindings:
|
||||
delete (default 'd')
|
||||
put (default 'p')
|
||||
clear (default 'c')
|
||||
redraw (default '<c-l>')
|
||||
reload (default '<c-r>')
|
||||
read (default ':')
|
||||
read-shell (default '$')
|
||||
@ -48,7 +49,6 @@ The following commands are provided by lf without default keybindings:
|
||||
|
||||
sync synchronizes yanked/deleted files with server
|
||||
echo prints its arguments to the message line
|
||||
redraw renew ui elements and redraw the screen
|
||||
cd changes working directory to its argument
|
||||
push simulate key pushes given in its argument
|
||||
|
||||
|
8
eval.go
8
eval.go
@ -332,6 +332,10 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
if err := sendRemote("send sync"); err != nil {
|
||||
app.ui.printf("clear: %s", err)
|
||||
}
|
||||
case "redraw":
|
||||
app.ui.sync()
|
||||
app.ui.renew()
|
||||
app.ui.loadFile(app.nav)
|
||||
case "reload":
|
||||
app.ui.sync()
|
||||
app.ui.renew()
|
||||
@ -368,10 +372,6 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
}
|
||||
case "echo":
|
||||
app.ui.msg = strings.Join(e.args, " ")
|
||||
case "redraw":
|
||||
app.ui.sync()
|
||||
app.ui.renew()
|
||||
app.ui.loadFile(app.nav)
|
||||
case "cd":
|
||||
path := "~"
|
||||
if len(e.args) > 0 {
|
||||
|
1
opts.go
1
opts.go
@ -70,6 +70,7 @@ func init() {
|
||||
gOpts.keys["d"] = &callExpr{"delete", nil}
|
||||
gOpts.keys["c"] = &callExpr{"clear", nil}
|
||||
gOpts.keys["p"] = &callExpr{"put", nil}
|
||||
gOpts.keys["<c-l>"] = &callExpr{"redraw", nil}
|
||||
gOpts.keys["<c-r>"] = &callExpr{"reload", nil}
|
||||
gOpts.keys[":"] = &callExpr{"read", nil}
|
||||
gOpts.keys["$"] = &callExpr{"read-shell", nil}
|
||||
|
Loading…
Reference in New Issue
Block a user