aboutsummaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-09-17 22:15:29 +0200
committerTom Smeding <tom.smeding@gmail.com>2021-01-28 22:20:13 +0100
commiteb0d99941c9241aeda4159a3e622c38070bd1c6b (patch)
tree25b71078dd9f96f72c8e68517f512214b0baf5c5 /rust
parente780e6c829f028ed7430c458f6002ac7c5409174 (diff)
rust: Better padded/aligned sender column
Diffstat (limited to 'rust')
-rw-r--r--rust/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/src/main.rs b/rust/src/main.rs
index 1ce64c6..5cf9666 100644
--- a/rust/src/main.rs
+++ b/rust/src/main.rs
@@ -454,7 +454,7 @@ impl State {
}
HItem::Service(msg) => {
- (String::from("--"), msg.as_str())
+ (String::from(" --"), msg.as_str())
}
};
@@ -462,7 +462,7 @@ impl State {
let mut done = false;
for (i, line) in lines.iter().enumerate().rev() {
if i == 0 {
- print!("{}{}", cursor::Goto(self.layout.rlsepx + 2, y + 1), prefix);
+ print!("{}{}", cursor::Goto(nicksepx - u16::try_from(prefix.len()).unwrap(), y + 1), prefix);
}
print!("{}{}", cursor::Goto(nicksepx + 3, y + 1), line);
if y == 0 { done = true; break; }
@@ -497,7 +497,7 @@ impl State {
data.maxnicklen = data.maxnicklen.max(msg.username.len() + 2);
}
HItem::Service(_) => {
- data.maxnicklen = data.maxnicklen.max(2);
+ data.maxnicklen = data.maxnicklen.max(3);
}
}
self.rooms.get_mut(room).unwrap().history.push(item);