mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-19 21:29:52 -07:00
Fix image preview placement when messages are preceded by a date in the timeline (#257)
This commit is contained in:
parent
949100bdc7
commit
91ca50aecb
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue