Skip to content

Commit

Permalink
account for dates in timeline when printing image previews
Browse files Browse the repository at this point in the history
  • Loading branch information
reynoldsme committed Apr 13, 2024
1 parent 949100b commit 0fcf46a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,8 @@ impl Message {
let proto = proto.map(|p| {
let y_off = text.lines.len() as u16;
let x_off = fmt.cols.user_gutter_width(settings);
// Adjust y_off by 1 if a date was printed before the message to account for the extra line.
let y_off = if fmt.date.is_some() { y_off + 1 } else { y_off };
(p, x_off, y_off)
});

Expand Down

0 comments on commit 0fcf46a

Please sign in to comment.