From 543e98faafbeac0b27c301bf5add75dad2009aa3 Mon Sep 17 00:00:00 2001 From: 0xf8 <0xf8.dev@proton.me> Date: Tue, 30 May 2023 00:31:35 -0400 Subject: [PATCH] Update selection title after editing definition --- src/platform.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform.rs b/src/platform.rs index 49177b4..4dc8cc2 100644 --- a/src/platform.rs +++ b/src/platform.rs @@ -157,6 +157,7 @@ Host {host} match action { 0 => { // Connect + // TODO: clear screen before connect std::process::Command::new("ssh") .arg("-F") .arg(host.config.to_owned()) @@ -177,7 +178,8 @@ Host {host} 2 => { // Edit definition let edited_host = host.edit()?; config.configs.remove(host); - config.configs.insert(edited_host); + config.configs.insert(edited_host.to_owned()); + host.clone_from(&edited_host); config.save(); } 3 => { // Delete