Commit b17d0151 authored by ticki's avatar ticki

Update readme, fix rainbow example

parent e36ff1c7
......@@ -37,7 +37,7 @@ default-features = false
## Features
- Raw mode.
- Truecolor.
- TrueColor.
- 256-color mode.
- Cursor movement.
- Color output.
......@@ -48,6 +48,7 @@ default-features = false
- Termios control.
- Password input.
- Redox support.
- Safe `isatty` wrapper.
- Panic-free error handling.
- Special keys events (modifiers, special keys, etc.).
- Allocation-free.
......
......@@ -7,7 +7,7 @@ use termion::input::{TermRead, Key};
use std::io::{Write, stdout, stdin};
fn rainbow<W: Write>(stdout: &mut W, blue: u8) {
write!(stdout, "{}", termion::cursor::Goto(1, 1)).unwrap();
write!(stdout, "{}{}", termion::cursor::Goto(1, 1), termion::clear::All).unwrap();
for red in (0..255).step_by(8 as u8) {
for green in (0..255).step_by(4) {
......@@ -28,7 +28,7 @@ fn main() {
termion::cursor::Goto(1, 1),
termion::cursor::Hide).unwrap();
let mut blue = 0u8;
let mut blue = 172u8;
for c in stdin.keys() {
match c.unwrap() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment