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", "delete",
"put", "put",
"clear", "clear",
"redraw",
"renew", "renew",
"sync", "sync",
"echo", "echo",

9
doc.go
View File

@ -41,10 +41,11 @@ The following commands are provided by lf with default keybindings:
The following commands are provided by lf without default keybindings: The following commands are provided by lf without default keybindings:
sync synchronizes yanked/deleted files with server sync synchronizes yanked/deleted files with server
echo prints its arguments to the message line echo prints its arguments to the message line
cd changes working directory to its argument redraw renew ui elements and redraw the screen
push simulate key pushes given in its argument cd changes working directory to its argument
push simulate key pushes given in its argument
The following command line commands are provided by lf with default The following command line commands are provided by lf with default
keybindings: keybindings:

View File

@ -45,10 +45,11 @@ The following commands are provided by lf with default keybindings:
The following commands are provided by lf without default keybindings: The following commands are provided by lf without default keybindings:
sync synchronizes yanked/deleted files with server sync synchronizes yanked/deleted files with server
echo prints its arguments to the message line echo prints its arguments to the message line
cd changes working directory to its argument redraw renew ui elements and redraw the screen
push simulate key pushes given in its argument cd changes working directory to its argument
push simulate key pushes given in its argument
The following command line commands are provided by lf with default The following command line commands are provided by lf with default
keybindings: keybindings:

View File

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