fix: handle empty lines

This commit is contained in:
Anna 2022-09-02 18:09:20 -04:00
parent 2237d90bcb
commit e01bb199c2
1 changed files with 6 additions and 1 deletions

View File

@ -820,7 +820,12 @@ internal sealed class ChatLog : IUiComponent {
ImGui.SameLine();
}
this.DrawChunks(message.Content, true, handler, lineWidth);
if (message.Content.Count == 0) {
this.DrawChunks(new[] { new TextChunk(ChunkSource.Content, null, " ") }, true, handler, lineWidth);
} else {
this.DrawChunks(message.Content, true, handler, lineWidth);
}
var afterDraw = ImGui.GetCursorScreenPos();
message.Height = ImGui.GetCursorPosY() - lastPos;