Crates.io | cursive_buffered_backend |
lib.rs | cursive_buffered_backend |
version | 0.6.2 |
source | src |
created_at | 2018-12-19 00:24:09.996984 |
updated_at | 2024-08-08 19:21:18.986085 |
description | The buffering backend for any Cursive backend |
homepage | |
repository | https://github.com/agavrilov/cursive_buffered_backend |
max_upload_size | |
id | 102616 |
size | 20,086 |
The buffering backend for any Cursive backend. Mainly it is created to address a flickering issue with Termion backend.
Inspired by the comment on the similar issue on Termion itself.
let backend_init = || -> std::io::Result<Box<dyn cursive::backend::Backend>> {
let backend = cursive::backends::termion::Backend::init()?;
let buffered_backend = cursive_buffered_backend::BufferedBackend::new(backend);
Ok(Box::new(buffered_backend))
};
let mut app = Cursive::new();
app.try_run_with(backend_init).ok()?;