initial
This commit is contained in:
@@ -45,7 +45,7 @@ impl Entry {
|
||||
self.info.push((key.to_owned(), value.to_string()));
|
||||
}
|
||||
|
||||
pub fn add_image(&mut self, sixel_data: String) {
|
||||
pub fn set_image(&mut self, sixel_data: String) {
|
||||
self.image = Some(sixel_data);
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ fn get_input() -> Option<Action> {
|
||||
}),
|
||||
Err(e) => {
|
||||
eprintln!("ERROR: {:#?}", e);
|
||||
std::process::exit(1);
|
||||
exit();
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
@@ -72,7 +72,7 @@ fn get_input() -> Option<Action> {
|
||||
Ok(false) => None,
|
||||
Err(e) => {
|
||||
eprintln!("ERROR: {:#?}", e);
|
||||
std::process::exit(1);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,6 +138,9 @@ fn render(
|
||||
selected: u16,
|
||||
offset: u16,
|
||||
) -> Result<(), io::Error> {
|
||||
if entries.is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
stdout.queue(MoveTo(0, 0))?.queue(Clear(ClearType::All))?;
|
||||
for (i, entry) in entries.iter().enumerate() {
|
||||
stdout
|
||||
|
||||
Reference in New Issue
Block a user