Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Fix an internal failure that can occur when a dynamic chat output hasn't been cleaned up properly #598

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Source/Chatbook/SendChat.wl
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,13 @@ prepareChatOutputPage[ target_CellObject, cell_Cell ] := Enclose[
Throw @ cellPrint @ cell
];

If[ MatchQ[ prevCellExpr, Cell[ BoxData[ TagBox[ _, "DynamicTextDisplay", ___ ], ___ ], ___ ] ],
(* The target cell is a left-over dynamic chat output that hasn't been cleaned up properly,
so delete it and create a new chat output. *)
NotebookDelete @ target;
Throw @ cellPrint @ cell
];

prevPage = ConfirmMatch[
Replace[ First @ prevCellExpr, text_String :> TextData @ { text } ],
_TextData,
Expand Down
Loading