project mode structure

This commit is contained in:
Penwing 2024-02-01 13:11:43 +01:00
parent 816221370a
commit 3b47ef0ca6

View file

@ -90,11 +90,33 @@ impl CommandEntry {
if let Ok(Some(_exit_status)) = buffer.child.try_wait() { if let Ok(Some(_exit_status)) = buffer.child.try_wait() {
//self.result.push(Line::output(format!("Command finished with status: {:?}\n", exit_status))); //self.result.push(Line::output(format!("Command finished with status: {:?}\n", exit_status)));
self.buffer_dump();
self.finished = true; self.finished = true;
} }
} }
} }
fn buffer_dump(&mut self) {
// if self.buffer.is_none() {
// return
// }
//
// let output_buffer = &self.buffer.as_ref().unwrap().output_buffer;
// for line in output_buffer.lines() {
// match line {
// Ok(line) => self.result.push(Line::output(format!("{}\n", line))),
// Err(_) => return,
// }
// }
// let error_buffer = &self.buffer.as_ref().unwrap().error_buffer;
// for line in error_buffer.lines() {
// match line {
// Ok(line) => self.result.push(Line::error(format!("{}\n", line))),
// Err(_) => return,
// }
// }
}
pub fn copy_error_code(&self) { pub fn copy_error_code(&self) {
let mut txt: String = "".to_string(); let mut txt: String = "".to_string();
for line in self.result.iter() { for line in self.result.iter() {