aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Campos <james.r.campos@gmail.com>2020-04-25 00:45:53 -0700
committerJames Campos <james.r.campos@gmail.com>2020-04-25 00:45:53 -0700
commit9157e4ef1a65de7da73527ddcf4ac05ffc2ddac8 (patch)
treed55a0164eac805635dc6c48f2fccb412d34cd7be
parented5d2b8197bcf6ce9365e0da005ec22a41e2add8 (diff)
downloadbk-9157e4ef1a65de7da73527ddcf4ac05ffc2ddac8.tar.gz
readme: mention ?
-rw-r--r--README.md4
-rw-r--r--src/main.rs4
2 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index 213bc6d..45fc5c8 100644
--- a/README.md
+++ b/README.md
@@ -5,5 +5,9 @@ bk is a WIP terminal epub reader
cargo install --path .
+# usage
+
+type <kbd>?</kbd> to see the commands
+
# inspiration
<https://github.com/wustho/epr>
diff --git a/src/main.rs b/src/main.rs
index 332b91e..68f3b46 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -402,7 +402,6 @@ impl Bk {
stdout.flush().unwrap();
}
fn render_help(&self) {
- let mut stdout = stdout();
let text = r#"
Esc q Quit
? Help
@@ -418,8 +417,9 @@ PageDown Right Space f l Page Down
Home g Chapter Start
End G Chapter End
"#;
- queue!(stdout, terminal::Clear(terminal::ClearType::All),).unwrap();
+ let mut stdout = stdout();
+ queue!(stdout, terminal::Clear(terminal::ClearType::All),).unwrap();
for (i, line) in text.lines().enumerate() {
queue!(stdout, cursor::MoveTo(0, i as u16), Print(line)).unwrap();
}