shell: use a ListEditor of ProcessLaunchers in top level
This commit is contained in:
parent
911b69aeea
commit
c68a9f785d
7 changed files with 378 additions and 178 deletions
nested/src
|
@ -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 {
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue