Commit 31cad45c authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

TextEditor: Fix handling of multiline text for code assistant

Task-number: QTCREATORBUG-8544
Change-Id: Ic0cffe941309ee38cc62111960c5ddad46025a8c
Reviewed-by: default avatarErik Verbruggen <>
parent dcd71423
......@@ -61,7 +61,8 @@ QString textAt(QTextCursor tc, int pos, int length)
tc.setPosition(pos + length, QTextCursor::KeepAnchor);
return tc.selectedText();
// selectedText() returns U+2029 (PARAGRAPH SEPARATOR) instead of newline
return tc.selectedText().replace(QChar::ParagraphSeparator, QLatin1Char('\n'));
} // Util
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment