Skip to content

Commit 5423844

Browse files
authored
feat(ui): when copying simple values, use pure text (#80)
1 parent 5a446a1 commit 5423844

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/ui/app.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,16 @@ impl App {
590590
return Some(item.name.clone());
591591
}
592592

593-
let parser = self.tree_overview.get_parser();
594-
let data = parser.to_string(&item.value);
593+
let data = match &item.value {
594+
Value::String(s) => s.clone(),
595+
Value::Number(n) => n.to_string(),
596+
Value::Bool(b) => b.to_string(),
597+
_ => {
598+
let parser = self.tree_overview.get_parser();
599+
parser.to_string(&item.value)
600+
}
601+
};
602+
595603
Some(data)
596604
}
597605
}

0 commit comments

Comments
 (0)