URI: 
       Fixed some issues in option loading code. - icy_draw - icy_draw is the successor to mystic draw. fork / mirror
  HTML git clone https://git.drkhsh.at/icy_draw.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit 9908e3b7e977e234cedb9a98c55283d50089754b
   DIR parent 5291a2b7cc198227f1cfb75ef097d0cadd3ce58a
  HTML Author: Mike Krüger <mkrueger@posteo.de>
       Date:   Mon, 22 Jul 2024 15:20:06 +0200
       
       Fixed some issues in option loading code.
       
       Fixes Issue #16.
       
       Diffstat:
         M crates/icy_term/src/data/options.rs |      22 ++++++++++++++--------
       
       1 file changed, 14 insertions(+), 8 deletions(-)
       ---
   DIR diff --git a/crates/icy_term/src/data/options.rs b/crates/icy_term/src/data/options.rs
       @@ -335,7 +335,6 @@ impl Options {
            ///
            /// This function will return an error if .
            pub fn store_options(&self) -> TerminalResult<()> {
       -        println!("store_options");
                #[cfg(not(target_arch = "wasm32"))]
                if let Some(proj_dirs) = directories::ProjectDirs::from("com", "GitHub", "icy_term") {
                    let file_name = proj_dirs.config_dir().join("options.toml");
       @@ -443,13 +442,20 @@ fn parse_value(options: &mut Options, value: &Value) {
                            "window_coord" => {
                                if let Value::String(str) = v {
                                    let mut minmax = str.split('-');
       -                            let min = minmax.next().unwrap().split('/').collect::<Vec<&str>>();
       -                            let max = minmax.next().unwrap().split('/').collect::<Vec<&str>>();
       -
       -                            options.window_rect = Some(Rect::from_min_max(
       -                                egui::Pos2::new(min[0].parse::<f32>().unwrap(), min[1].parse::<f32>().unwrap()),
       -                                egui::Pos2::new(max[0].parse::<f32>().unwrap(), max[1].parse::<f32>().unwrap()),
       -                            ));
       +                            if let Some(min) = minmax.next() {
       +                                let min = min.split('/').collect::<Vec<&str>>();
       +                                if let Some(max) = minmax.next() {
       +                                    let max = max.split('/').collect::<Vec<&str>>();
       +                                    if let (Ok(x1), Ok(y1)) = (min[0].parse::<f32>(), min[1].parse::<f32>()) {
       +                                        if let (Ok(x2), Ok(y2)) = (max[0].parse::<f32>(), max[1].parse::<f32>()) {
       +                                            options.window_rect = Some(Rect::from_min_max(
       +                                                egui::Pos2::new(x1, y1),
       +                                                egui::Pos2::new(x2, y2),
       +                                            ));
       +                                        }
       +                                    }
       +                                }
       +                            }
                                }
                            }
                            "scaling" => {