diff options
author | Gokul Soumya | 2023-02-02 19:32:05 +0000 |
---|---|---|
committer | GitHub | 2023-02-02 19:32:05 +0000 |
commit | e31943c4c4a996da1fe8704db052c7d44984fcc4 (patch) | |
tree | 4052b932c6da3e4c64cf864ba1de08c80d21fcac /helix-term/src/commands.rs | |
parent | 2949bb018c00e21d0465bab6970708407cc29ccd (diff) |
Tabulate buffer picker contents (#5777)
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r-- | helix-term/src/commands.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 4f27fc80..d1e28bbe 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2430,20 +2430,15 @@ fn buffer_picker(cx: &mut Context) { None => SCRATCH_BUFFER_NAME, }; - let mut flags = Vec::new(); + let mut flags = String::new(); if self.is_modified { - flags.push("+"); + flags.push('+'); } if self.is_current { - flags.push("*"); + flags.push('*'); } - let flag = if flags.is_empty() { - "".into() - } else { - format!(" ({})", flags.join("")) - }; - format!("{} {}{}", self.id, path, flag).into() + Row::new([self.id.to_string(), flags, path.to_string()]) } } |