shell: use a ListEditor of ProcessLaunchers in top level

This commit is contained in:
Michael Sippel 2021-09-24 23:31:09 +02:00
parent 911b69aeea
commit c68a9f785d
Signed by: senvas
GPG key ID: 060F22F65102F95C
7 changed files with 378 additions and 178 deletions
nested/src

View file

@ -699,7 +699,7 @@ where ItemEditor: TerminalEditor + ?Sized + Send + Sync + 'static,
self.cursor_port.outer()
}
fn get_item(&self) -> Option<Arc<RwLock<ItemEditor>>> {
pub fn get_item(&self) -> Option<Arc<RwLock<ItemEditor>>> {
if let Some(idx) = self.cursor.get().idx {
Some(self.data.get(idx))
} else {

View file

@ -53,7 +53,7 @@ pub fn read_ansi_from<R: Read + Unpin>(ansi_reader: &mut R, port: InnerViewPort<
}
},
Err(err) => {
println!("err: {}", err);
//println!("err: {}", err);
break;
},
}
@ -138,10 +138,12 @@ impl Perform for PerfAtom {
}
fn csi_dispatch(&mut self, params: &Params, intermediates: &[u8], ignore: bool, c: char) {
/*
eprintln!(
"[csi_dispatch] params={:#?}, intermediates={:?}, ignore={:?}, char={:?}",
params, intermediates, ignore, c
);
*/
let mut piter = params.into_iter();
@ -213,7 +215,7 @@ impl Perform for PerfAtom {
if let Some(y) = piter.next() { self.cursor.y = y[0] as i16 - 1 };
if let Some(x) = piter.next() { self.cursor.x = x[0] as i16 - 1 };
eprintln!("cursor at {:?}", self.cursor);
//eprintln!("cursor at {:?}", self.cursor);
},
'A' => { self.cursor.y -= piter.next().unwrap()[0] as i16; }