Skip to content

Commit 91ca50a

Browse files
authored
Fix image preview placement when messages are preceded by a date in the timeline (#257)
1 parent 949100b commit 91ca50a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/message/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,8 @@ impl Message {
961961
let proto = proto.map(|p| {
962962
let y_off = text.lines.len() as u16;
963963
let x_off = fmt.cols.user_gutter_width(settings);
964+
// Adjust y_off by 1 if a date was printed before the message to account for the extra line.
965+
let y_off = if fmt.date.is_some() { y_off + 1 } else { y_off };
964966
(p, x_off, y_off)
965967
});
966968

0 commit comments

Comments
 (0)