add redraw command for ui update

Mentioned in #92.
This commit is contained in:
Gokcehan 2017-11-19 02:36:01 +03:00
parent 9ac32fc850
commit 30ed1c651f
4 changed files with 14 additions and 8 deletions

View File

@ -39,6 +39,7 @@ var (
"delete",
"put",
"clear",
"redraw",
"renew",
"sync",
"echo",

1
doc.go
View File

@ -43,6 +43,7 @@ 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

View File

@ -47,6 +47,7 @@ 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

View File

@ -391,6 +391,9 @@ func (e *callExpr) eval(app *app, args []string) {
app.ui.message = msg
log.Printf(msg)
}
case "redraw":
app.ui.sync()
app.ui.renew()
case "renew":
app.ui.sync()
app.ui.renew()