fix: handle empty lines

This commit is contained in:
Anna committed 2022-09-02 18:09:20 -04:00
1 parent 2237d90bcb
commit e01bb199c2
1 file changed
+6 -1
+6 -1
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;