Merge branch 'master' of github.com:Ticki/libterm

This commit is contained in:
ticki 2016-07-29 19:50:42 +02:00
commit 07301d4c24
2 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,7 @@ version of Termion.
| 0.1.0 | 1.0.0 | 0.1.0 | 1.0.0
|--------------------------------|--------------------------- |--------------------------------|---------------------------
| `use termion::IntoRawMode` | `use termion::raw::IntoRawMode` | `use termion::IntoRawMode` | `use termion::raw::IntoRawMode`
| `use termion::TermRead` | `use termion::input::TermRead`
| `stdout.color(color::Red);` | `write!(stdout, "{}", color::Fg(color::Red));` | `stdout.color(color::Red);` | `write!(stdout, "{}", color::Fg(color::Red));`
| `stdout.color_bg(color::Red);` | `write!(stdout, "{}", color::Bg(color::Red));` | `stdout.color_bg(color::Red);` | `write!(stdout, "{}", color::Bg(color::Red));`
| `stdout.goto(x, y);` | `write!(stdout, "{}", cursor::Goto(x, y));` | `stdout.goto(x, y);` | `write!(stdout, "{}", cursor::Goto(x, y));`

View File

@ -13,6 +13,7 @@ fn main() {
termion::clear::All, termion::clear::All,
termion::cursor::Goto(1, 1), termion::cursor::Goto(1, 1),
termion::cursor::Hide).unwrap(); termion::cursor::Hide).unwrap();
stdout.flush().unwrap();
for c in stdin.keys() { for c in stdin.keys() {
write!(stdout, "{}{}", termion::cursor::Goto(1, 1), termion::clear::CurrentLine).unwrap(); write!(stdout, "{}{}", termion::cursor::Goto(1, 1), termion::clear::CurrentLine).unwrap();