ulyssa / iamb

A Matrix client for Vim addicts
https://iamb.chat
Apache License 2.0
608 stars 45 forks source link

Fix image preview placement when messages are preceded by a date in the timeline #257

Closed reynoldsme closed 5 months ago

reynoldsme commented 5 months ago

Currently image previews are printed one line too high if the message had a date inserted into it indicating a change of date between the current and preceding message. With this PR we conditionally check if a date was inserted and adjust the y offset used to place the rendered the image.

Tested in: XTerm(374), wezterm 20240203-110809-5046fc22, and konsole 24.02.1.

Before change:

before change

After change:

after
ulyssa commented 5 months ago

Merged! Thank you for fixing this!