ignore first update cursor postion

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-02-03 18:28:47 +08:00
parent a2c3c8ef91
commit 17aac13247
3 changed files with 14 additions and 4 deletions

View File

@@ -1117,8 +1117,12 @@ impl LoginConfigHandler {
} else if name == "show-quality-monitor" {
config.show_quality_monitor.v = !config.show_quality_monitor.v;
} else {
let v = self.options.get(&name).is_some();
if v {
let is_set = self
.options
.get(&name)
.map(|o| !o.is_empty())
.unwrap_or(false);
if is_set {
self.config.options.remove(&name);
} else {
self.config.options.insert(name, "Y".to_owned());