mirror of https://github.com/helix-editor/helix
Tabulate buffer picker contents (#5777)
parent
2949bb018c
commit
e31943c4c4
|
@ -2430,20 +2430,15 @@ fn buffer_picker(cx: &mut Context) {
|
||||||
None => SCRATCH_BUFFER_NAME,
|
None => SCRATCH_BUFFER_NAME,
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut flags = Vec::new();
|
let mut flags = String::new();
|
||||||
if self.is_modified {
|
if self.is_modified {
|
||||||
flags.push("+");
|
flags.push('+');
|
||||||
}
|
}
|
||||||
if self.is_current {
|
if self.is_current {
|
||||||
flags.push("*");
|
flags.push('*');
|
||||||
}
|
}
|
||||||
|
|
||||||
let flag = if flags.is_empty() {
|
Row::new([self.id.to_string(), flags, path.to_string()])
|
||||||
"".into()
|
|
||||||
} else {
|
|
||||||
format!(" ({})", flags.join(""))
|
|
||||||
};
|
|
||||||
format!("{} {}{}", self.id, path, flag).into()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue