on master help sign in
Tabulate buffer picker contents (#5777)
commite31943c4c4a996da1fe8704db052c7d44984fcc4 authorGokul Soumya <gokulps15@gmail.com> dateFri 3 Feb 2023, 01:02 (4 years ago) parent2949bb0
1 file changed+4−9
helix-term/src/commands.rs+4−9
helix-term/src/commands.rs+4−9
@@ -2430,20 +2430,15 @@ fn buffer_picker(cx: &mut Context) {
24302430 None => SCRATCH_BUFFER_NAME,
24312431 };
24322432
2433− let mut flags = Vec::new();
2433+ let mut flags = String::new();
24342434 if self.is_modified {
2435− flags.push("+");
2435+ flags.push('+');
24362436 }
24372437 if self.is_current {
2438− flags.push("*");
2438+ flags.push('*');
24392439 }
24402440
2441− let flag = if flags.is_empty() {
2442− "".into()
2443− } else {
2444− format!(" ({})", flags.join(""))
2445− };
2446− format!("{} {}{}", self.id, path, flag).into()
2441+ Row::new([self.id.to_string(), flags, path.to_string()])
24472442 }
24482443 }
24492444