1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-09-08 16:35:49 +03:00

improve block titles to examples and simplify crossterm example

Этот коммит содержится в:
rhysd
2022-06-12 17:47:02 +09:00
родитель ebc3eb8e6f
Коммит c59bff2d26
2 изменённых файлов: 13 добавлений и 4 удалений

Просмотреть файл

@@ -42,7 +42,11 @@ fn main() -> Result<(), Box<dyn Error>> {
};
let mut textarea = TextArea::default();
textarea.set_block(Block::default().borders(Borders::ALL).title("EXAMPLE"));
textarea.set_block(
Block::default()
.borders(Borders::ALL)
.title("Termion Minimal Example"),
);
let layout = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Min(1)].as_ref());
@@ -60,6 +64,7 @@ fn main() -> Result<(), Box<dyn Error>> {
})?;
}
drop(term); // Leave terminal raw mode to print the following line
println!("Lines: {:?}", textarea.lines());
Ok(())
}