lib-nested-tty: reactivate list-cursor widget via new TreeNavExt trait

This commit is contained in:
Michael Sippel 2024-11-02 19:21:10 +01:00
parent e09f3e5656
commit fe4b571b8c
Signed by: senvas
GPG key ID: F96CF119C34B64A6
2 changed files with 24 additions and 3 deletions

View file

@ -1,5 +1,27 @@
use {
r3vi::{
view::{
OuterViewPort
},
buffer::vec::*,
projection::decorate_sequence::Separate
},
nested::{
edit_tree::{
TreeNav
},
editors::list::{
ListCursorMode
}
},
crate::{TerminalView, make_label, TerminalProjections}
};
impl TreeNav {
pub trait TreeNavExt {
fn get_cursor_widget(&self) -> OuterViewPort<dyn TerminalView>;
}
impl<T: TreeNav> TreeNavExt for T {
fn get_cursor_widget(&self) -> OuterViewPort<dyn TerminalView> {
VecBuffer::with_data(
vec![
@ -30,4 +52,3 @@ impl TreeNav {
.flatten()
}
}

View file

@ -1,4 +1,4 @@
pub mod color;
pub mod keymap;
pub mod cursor_widget;