Skip to content

Commit

Permalink
Fix regenerate response with references.
Browse files Browse the repository at this point in the history
  • Loading branch information
manyoso committed Jun 19, 2023
1 parent f76df0d commit 7c28e79
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gpt4all-chat/responsetext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,14 @@ void ResponseText::handleTextChanged()
return;

m_isProcessingText = true;
QTextDocument* doc = m_textDocument->textDocument();
handleContextLinks();
handleCodeBlocks();
// We insert an invisible char at the end to make sure the document goes back to the default
// text format
QTextDocument* doc = m_textDocument->textDocument();
QTextCursor cursor(doc);
QString invisibleCharacter = QString(QChar(0xFEFF));
cursor.insertText(invisibleCharacter, QTextCharFormat());
m_isProcessingText = false;
}

Expand Down

0 comments on commit 7c28e79

Please sign in to comment.