From 8d3cbb708f2871c0d6d0ecc227d4234b934b0146 Mon Sep 17 00:00:00 2001
From: Nicolas80 <nicolas.pmail@protonmail.com>
Date: Sun, 9 Feb 2025 12:35:07 +0100
Subject: [PATCH] * Adapted vault display to have a space before address value
 (for derivations); which fixes the incorrect selection when double-clicking
 an address in the terminal

---
 doc/config.md                 |  2 +-
 src/commands/vault/display.rs | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/config.md b/doc/config.md
index b8078ae..f1b2d68 100644
--- a/doc/config.md
+++ b/doc/config.md
@@ -94,7 +94,7 @@ gcli vault list all
 # │ SS58 Address/G1v1 public key                         Crypto    Path     Name          │
 # ╞═══════════════════════════════════════════════════════════════════════════════════════╡
 # │ 5DfhGyQdFobKM8NsWvEeAKk5EQQgYe9AydgJ7rMB6E1EqRzV     sr25519   <Base>   test-mnemonic │
-# │ ├─5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o             //1      firstDerive   │
+# │ ├ 5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o             //1      firstDerive   │
 # └───────────────────────────────────────────────────────────────────────────────────────┘
 ```
 
diff --git a/src/commands/vault/display.rs b/src/commands/vault/display.rs
index 8dd84c2..021a84f 100644
--- a/src/commands/vault/display.rs
+++ b/src/commands/vault/display.rs
@@ -82,7 +82,7 @@ pub fn compute_vault_accounts_row(
 
 	let address = if depth_account_tree_node > 0 {
 		let ancestors = "│ ".repeat(depth_account_tree_node - 1);
-		format!("{}├─{}", ancestors, account_tree_node.account.address)
+		format!("{}├ {}", ancestors, account_tree_node.account.address)
 	} else {
 		account_tree_node.account.address.to_string()
 	};
@@ -161,10 +161,10 @@ mod tests {
 			│ SS58 Address/G1v1 public key                           Crypto    Path     Name           │
 			╞══════════════════════════════════════════════════════════════════════════════════════════╡
 			│ 5DfhGyQdFobKM8NsWvEeAKk5EQQgYe9AydgJ7rMB6E1EqRzV       sr25519   <Base>   Mother         │
-			│ ├─5D34dL5prEUaGNQtPPZ3yN5Y6BnkfXunKXXz6fo7ZJbLwRRH               //0      Child 1        │
-			│ │ ├─5Fh5PLQNt1xuEXm71dfDtQdnwceSew4oHewWBLsWAkKspV7d             //0      Grandchild 1   │
-			│ ├─5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o               //1      <Mother//1>    │
-			│ │ ├─5CvdJuB9HLXSi5FS9LW57cyHF13iCv5HDimo2C45KxnxriCT             //1      <Mother//1//1> │
+			│ ├ 5D34dL5prEUaGNQtPPZ3yN5Y6BnkfXunKXXz6fo7ZJbLwRRH               //0      Child 1        │
+			│ │ ├ 5Fh5PLQNt1xuEXm71dfDtQdnwceSew4oHewWBLsWAkKspV7d             //0      Grandchild 1   │
+			│ ├ 5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o               //1      <Mother//1>    │
+			│ │ ├ 5CvdJuB9HLXSi5FS9LW57cyHF13iCv5HDimo2C45KxnxriCT             //1      <Mother//1//1> │
 			│ 5ET2jhgJFoNQUpgfdSkdwftK8DKWdqZ1FKm5GKWdPfMWhPr4       ed25519   <Base>   MotherG1v1     │
 			│ └ G1v1: 86pW1doyJPVH3jeDPZNQa1UZFBo5zcdvHERcaeE758W7                                     │
 			└──────────────────────────────────────────────────────────────────────────────────────────┘"#
@@ -184,8 +184,8 @@ mod tests {
 			┌─────────────────────────────────────────────────────────────────────────────────────┐
 			│ SS58 Address/G1v1 public key                           Crypto   Path   Name         │
 			╞═════════════════════════════════════════════════════════════════════════════════════╡
-			│ ├─5D34dL5prEUaGNQtPPZ3yN5Y6BnkfXunKXXz6fo7ZJbLwRRH              //0    Child 1      │
-			│ │ ├─5Fh5PLQNt1xuEXm71dfDtQdnwceSew4oHewWBLsWAkKspV7d            //0    Grandchild 1 │
+			│ ├ 5D34dL5prEUaGNQtPPZ3yN5Y6BnkfXunKXXz6fo7ZJbLwRRH              //0    Child 1      │
+			│ │ ├ 5Fh5PLQNt1xuEXm71dfDtQdnwceSew4oHewWBLsWAkKspV7d            //0    Grandchild 1 │
 			└─────────────────────────────────────────────────────────────────────────────────────┘"#
 			};
 
-- 
GitLab